Skip to content

Commit 56330ec

Browse files
committed
Polish/fix LineDistributed (which is now fully expressed as ODE) [skip ci]
1 parent e5023cb commit 56330ec

1 file changed

Lines changed: 29 additions & 56 deletions

File tree

  • GridKit/Model/EMT/Component/Line/LineDistributed
Lines changed: 29 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LineDistributed Model
22

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

66
## Block Diagram
77

@@ -16,7 +16,7 @@ characteristic impedance $\mathbf{Z}_c$ and propagation model $\mathbf{H}$.
1616
Symbol | Units | JSON | Description | Note
1717
----------------- | ----------- | ------------ | ------------------------------------------------------ | ----
1818
$\mathbf{P}_\phi$ | [-] | `conductors` | Permutation matrix mapping each conductor to its phase | $\mathbf{P}_\phi \in \mathbb{R}^{N \times K}$
19-
$\mathbf{z}_c$ | [$\Omega$] | `Zc` | Characteristic impedance | $\mathbf{z}_c \in \mathbb{R}^{N \times K}$
19+
$\mathbf{y}_c$ | [S] | `Yc` | Characteristic admittance | $\mathbf{y}_c \in \mathbb{R}^{K \times N}$
2020
$\mathbf{h}$ | [-] | `H` | Propagation function | $\mathbf{h} \in \mathbb{R}^{K \times K}$
2121

2222
### Parameter Validation
@@ -34,19 +34,11 @@ $\mathbf{P}_\phi$, respectively.
3434

3535
#### Differential
3636

37-
Symbol | Units | Description | Note
38-
------ | ----- | ----------- | ----
39-
$\mathbf{i}^{\mathrm{sh}}_{1}$ | [A] | Shunt current at terminal `1` | $\mathbf{i}^{\mathrm{sh}}_{1} \in \mathbb{R}^K$
40-
$\mathbf{i}^{\mathrm{sh}}_{2}$ | [A] | Shunt current at terminal `2` | $\mathbf{i}^{\mathrm{sh}}_{2} \in \mathbb{R}^K$
37+
None.
4138

4239
#### Algebraic
4340

44-
Symbol | Units | Description | Note
45-
------ | ----- | ----------- | ----
46-
$\mathbf{i}^{\mathrm{inc}}_{1}$ | [A] | Incident current at terminal `1` | $\mathbf{i}^{\mathrm{inc}}_{1} \in \mathbb{R}^K$
47-
$\mathbf{i}^{\mathrm{inc}}_{2}$ | [A] | Incident current at terminal `2` | $\mathbf{i}^{\mathrm{inc}}_{2} \in \mathbb{R}^K$
48-
$\mathbf{i}^{\mathrm{ref}}_{1}$ | [A] | Reflected current at terminal `1` | $\mathbf{i}^{\mathrm{ref}}_{1} \in \mathbb{R}^K$
49-
$\mathbf{i}^{\mathrm{ref}}_{2}$ | [A] | Reflected current at terminal `2` | $\mathbf{i}^{\mathrm{ref}}_{2} \in \mathbb{R}^K$
41+
None.
5042

5143
### External Variables
5244

@@ -74,40 +66,32 @@ $\mathbf{i}^{\mathrm{inj}}_{2}$ | `i2` | Output | [A] | Current injection at ter
7466

7567
### Differential Equations
7668

77-
```math
78-
\begin{aligned}
79-
0 &= -\mathbf{v}_{1}
80-
+ \mathbf{z}_c*\,\mathbf{i}^{\mathrm{sh}}_{1} \\
81-
0 &= -\mathbf{v}_{2}
82-
+ \mathbf{z}_c*\,\mathbf{i}^{\mathrm{sh}}_{2}
83-
\end{aligned}
84-
```
69+
None.
8570

8671
### Algebraic Equations
8772

88-
The propagation operator $\mathbf{h}$ is the current-form propagation matrix:
89-
it maps reflected conductor current at the far terminal to incident conductor
90-
current at the near terminal.
91-
92-
```math
93-
\begin{aligned}
94-
0 &= -\mathbf{i}^{\mathrm{inc}}_{1}
95-
+ \mathbf{h}*\,\mathbf{i}^{\mathrm{ref}}_{2} \\
96-
0 &= -\mathbf{i}^{\mathrm{inc}}_{2}
97-
+ \mathbf{h}*\,\mathbf{i}^{\mathrm{ref}}_{1} \\
98-
0 &= -\mathbf{i}^{\mathrm{ref}}_{1}
99-
+ 2\,\mathbf{i}^{\mathrm{sh}}_{1}
100-
- \mathbf{i}^{\mathrm{inc}}_{1} \\
101-
0 &= -\mathbf{i}^{\mathrm{ref}}_{2}
102-
+ 2\,\mathbf{i}^{\mathrm{sh}}_{2}
103-
- \mathbf{i}^{\mathrm{inc}}_{2}
104-
\end{aligned}
105-
```
73+
None.
10674

107-
### Port Equations
75+
### Wiring
10876

10977
```math
11078
\begin{aligned}
79+
\mathbf{i}^{\mathrm{sh}}_{1} &=
80+
\mathbf{y}_c*\,\mathbf{v}_{1} \\
81+
\mathbf{i}^{\mathrm{sh}}_{2} &=
82+
\mathbf{y}_c*\,\mathbf{v}_{2} \\
83+
\mathbf{i}^{\mathrm{inc}}_{1} &=
84+
\mathbf{h}*\,\left(
85+
2\,\mathbf{i}^{\mathrm{sh}}_{2}
86+
-
87+
\mathbf{i}^{\mathrm{inc}}_{2}
88+
\right) \\
89+
\mathbf{i}^{\mathrm{inc}}_{2} &=
90+
\mathbf{h}*\,\left(
91+
2\,\mathbf{i}^{\mathrm{sh}}_{1}
92+
-
93+
\mathbf{i}^{\mathrm{inc}}_{1}
94+
\right) \\
11195
\mathbf{i}^{\mathrm{inj}}_{1} &=
11296
\mathbf{P}_\phi\left(
11397
\mathbf{i}^{\mathrm{inc}}_{1}
@@ -126,24 +110,15 @@ current at the near terminal.
126110

127111
## Initialization
128112

129-
Let subscript $0$ denote initial values. The shunt currents initialize from the
130-
characteristic-impedance residuals:
131-
132-
```math
133-
\begin{aligned}
134-
0 &= -\mathbf{v}_{1,0} + \mathbf{z}_c*\,\mathbf{i}^{\mathrm{sh}}_{1,0} \\
135-
0 &= -\mathbf{v}_{2,0} + \mathbf{z}_c*\,\mathbf{i}^{\mathrm{sh}}_{2,0}
136-
\end{aligned}
137-
```
138-
139-
The algebraic currents initialize from the algebraic residuals:
113+
Let subscript $0$ denote initial values. Initial values satisfy the wiring
114+
equations:
140115

141116
```math
142117
\begin{aligned}
143-
0 &= -\mathbf{i}^{\mathrm{inc}}_{1,0} + \mathbf{h}*\,\mathbf{i}^{\mathrm{ref}}_{2,0} \\
144-
0 &= -\mathbf{i}^{\mathrm{inc}}_{2,0} + \mathbf{h}*\,\mathbf{i}^{\mathrm{ref}}_{1,0} \\
145-
0 &= -\mathbf{i}^{\mathrm{ref}}_{1,0} + 2\,\mathbf{i}^{\mathrm{sh}}_{1,0} - \mathbf{i}^{\mathrm{inc}}_{1,0} \\
146-
0 &= -\mathbf{i}^{\mathrm{ref}}_{2,0} + 2\,\mathbf{i}^{\mathrm{sh}}_{2,0} - \mathbf{i}^{\mathrm{inc}}_{2,0}
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)
147122
\end{aligned}
148123
```
149124

@@ -155,5 +130,3 @@ Monitor | Units | Description | Note
155130
`i_sh_2` | [A] | Shunt current at terminal `2` | $\mathbf{i}^{\mathrm{sh}}_{2} \in \mathbb{R}^K$
156131
`i_inc_1` | [A] | Incident current at terminal `1` | $\mathbf{i}^{\mathrm{inc}}_{1} \in \mathbb{R}^K$
157132
`i_inc_2` | [A] | Incident current at terminal `2` | $\mathbf{i}^{\mathrm{inc}}_{2} \in \mathbb{R}^K$
158-
`i_ref_1` | [A] | Reflected current at terminal `1` | $\mathbf{i}^{\mathrm{ref}}_{1} \in \mathbb{R}^K$
159-
`i_ref_2` | [A] | Reflected current at terminal `2` | $\mathbf{i}^{\mathrm{ref}}_{2} \in \mathbb{R}^K$

0 commit comments

Comments
 (0)