Skip to content

Commit 593fdbd

Browse files
abirchfieldpelesh
andauthored
Update modeling documentation structure (#128)
* Initial update to GENROU docs * Initial update to GENSAL docs * Initial update to load docs * Initial BusFault docs * Initial branch docs update * Correct load math markers --------- Co-authored-by: abirchfield <abirchfield@users.noreply.github.com> Co-authored-by: pelesh <peless@ornl.gov>
1 parent a089fec commit 593fdbd

5 files changed

Lines changed: 350 additions & 291 deletions

File tree

src/Model/PhasorDynamics/Branch/README.md

Lines changed: 59 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# Branch Model
1+
# Transmission Line Branch Model
22

33
Transmission lines and different types of transformers (traditional, Load
44
Tap-Changing transformers (LTC) and Phase Angle Regulators (PARs)) can be
55
modeled with a common branch model.
66

7-
## Transmission Line Model
8-
97
The most common circuit that is used to represent the transmission line model
108
is $`\pi`$ circuit as shown in Figure 1. The positive flow direction is into
119
buses. Commonly used convention is to define positive direction to be from
@@ -18,75 +16,74 @@ provides more flexibility for modeling.
1816
Figure 1: Transmission line $`\pi`$ equivalent circuit
1917
</div>
2018

21-
Here
22-
``` math
23-
Z = R + jX
24-
```
25-
and
19+
## Model Parameters
20+
21+
Symbol | Units | Description | Note
22+
------------|---------|---------------------------------| ------
23+
$R$ | [p.u.] | Branch series resistance |
24+
$X$ | [p.u.] | Branch series reactance |
25+
$G$ | [p.u.] | Branch shunt conductance |
26+
$B$ | [p.u.] | Branch shunt susceptance |
27+
28+
### Model Derived Parameters
29+
Note the difference between little-g and big-G, little-b, big-B in these equations.
2630
``` math
27-
Y = G + jB,
28-
```
29-
where $`R`$ is line series resistance, $`X`$ is line series reactance, $`B`$ is
30-
line shunt charging, and $`G`$ is line shunt conductance. As can be seen from
31-
Figure 1 total $`B`$ and $`G`$ are separated between two buses. The current
32-
entering bus 1 can be obtained from Kirchhoff's current law as
33-
```math
34-
I_1 = y(V_2 - V_1) - \frac{Y}{2} V_1,
35-
```
36-
where $`V_1`$ and $`V_2`$ are respective bus voltages and
37-
```math
38-
y = \frac{1}{Z} = \frac{R}{R^2+X^2} + j\frac{-X}{R^2+X^2} = g + jb.
39-
```
40-
Similarly, current entering bus 2 is given as
41-
```math
42-
I_2 = y(V_1 - V_2) + \frac{Y}{2} V_2.
43-
```
44-
These equations can be written in a compact form as:
45-
```math
46-
\begin{bmatrix}
47-
I_{1}\\
48-
I_{2}
49-
\end{bmatrix}
50-
= \mathbf{Y}
51-
\begin{bmatrix}
52-
V_{1}\\
53-
V_{2}
54-
\end{bmatrix}
55-
```
56-
where:
57-
```math
58-
\mathbf{Y}_{TL}=\begin{bmatrix}
59-
-(g + jb) - \dfrac{G+jB}{2} & g + jb \\
60-
g + jb & -(g + jb) - \dfrac{G+jB}{2}
61-
\end{bmatrix}
31+
\begin{aligned}
32+
g &=\dfrac{R}{R^2 + X^2} \\
33+
b &= -\dfrac{X}{R^2 + X^2}\\
34+
\end{aligned}
6235
```
6336

64-
### Branch contributions to residuals at adjacent buses
6537

66-
After some algebra, one obtains expressions for real and imaginary components
67-
for the currents entering adjacent buses:
68-
```math
69-
I_{r1} = -\left(g + \frac{G}{2}\right) V_{r1} + \left(b + \frac{B}{2} \right) V_{i1}
70-
+ g V_{r2} - b V_{i2}
71-
```
38+
## Model Variables
7239

73-
```math
74-
I_{i1} = -\left(b + \frac{B}{2} \right) V_{r1} - \left(g + \frac{G}{2}\right) V_{i1}
75-
+ b V_{r2} + g V_{i2}
76-
```
40+
### Internal Variables
7741

78-
```math
79-
I_{r2} = g V_{r1} - b V_{i1}
80-
- \left(g + \frac{G}{2}\right) V_{r2} + \left(b + \frac{B}{2} \right) V_{i2}
81-
```
42+
#### Differential
43+
None.
8244

83-
```math
84-
I_{i2} = b V_{r1} + g V_{i1}
85-
- \left(b + \frac{B}{2} \right) V_{r2} - \left(g + \frac{G}{2}\right) V_{i2}
45+
#### Algebraic
46+
47+
Symbol | Units | Description | Note
48+
------------|---------|---------------------------------| ------
49+
$I_{r1}$ | [p.u.] | Terminal current, real component, bus 1 | Read by bus
50+
$I_{i1}$ | [p.u.] | Terminal current, imaginary component, bus 1 | Read by bus
51+
$I_{r2}$ | [p.u.] | Terminal current, real component, bus 2 | Read by bus
52+
$I_{i2}$ | [p.u.] | Terminal current, imaginary component, bus 2 | Read by bus
53+
54+
55+
### External Variables
56+
57+
#### Differential
58+
None.
59+
60+
#### Algebraic
61+
Symbol | Units | Description | Note
62+
------------|---------|---------------------------------| ------
63+
$V_{r1}$ | [p.u.] | Terminal voltage, real component, bus 1 | owned by bus object
64+
$V_{i1}$ | [p.u.] | Terminal voltage, imaginary component, bus 1 | owned by bus object
65+
$V_{r2}$ | [p.u.] | Terminal voltage, real component, bus 2 | owned by bus object
66+
$V_{i2}$ | [p.u.] | Terminal voltage, imaginary component, bus 2 | owned by bus object
67+
68+
69+
## Model Equations
70+
71+
### Differential Equations
72+
None.
73+
74+
### Algebraic Equations
75+
``` math
76+
\begin{aligned}
77+
0 &= - I_{r1} -\left(g + \dfrac{G}{2}\right) V_{r1} + \left(b + \dfrac{B}{2}\right) V_{i1} + g V_{r2} - b V_{i2}\\
78+
0 &= I_{i1} - \left(b + \dfrac{B}{2}\right) V_{r1} - \left(g + \dfrac{G}{2}\right) V_{i1} + b V_{r2} + g V_{i2}\\
79+
0 &= I_{r2} + g V_{r1} - b V_{i1} - \left(g + \dfrac{G}{2}\right) V_{r2} + \left(b + \dfrac{B}{2}\right) V_{i2}\\
80+
0 &= I_{i2} + b V_{r1} + g V_{i1} - \left(b + \dfrac{B}{2}\right) V_{r2} - \left(g + \dfrac{G}{2}\right) V_{i2}
81+
\end{aligned}
8682
```
8783

8884

89-
## Transformer Branch Model
85+
86+
# Transformer Branch Model
9087

9188
**Note: Transformer model not yet implemented**
9289

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Bus Fault
2+
3+
Represents an impedance fault at a bus. This device can exist in two states, on or off, controlled by the user. Following a state change, generally the solver needs to be reset as this is a discrete event.
4+
5+
## Model Parameters
6+
7+
Symbol | Units | Description | Note
8+
------------|---------|---------------------------------| ------
9+
$R$ | [p.u.] | Fault resistance |
10+
$X$ | [p.u.] | Fault reactance |
11+
$U$ | [unitless] | Binary status $$\in \{0, 1\}$$ | Set by user to put fault on or off.
12+
13+
### Model Derived Parameters
14+
``` math
15+
\begin{aligned}
16+
G &=\dfrac{R}{R^2+ X^2} \\
17+
B &= -\dfrac{X}{R^2 + X^2}\\
18+
\end{aligned}
19+
```
20+
21+
22+
## Model Variables
23+
24+
### Internal Variables
25+
26+
#### Differential
27+
None.
28+
29+
#### Algebraic
30+
31+
Symbol | Units | Description | Note
32+
------------|---------|---------------------------------| ------
33+
$I_r$ | [p.u.] | Terminal current, real component | Read by bus
34+
$I_i$ | [p.u.] | Terminal current, imaginary component | Read by bus
35+
36+
37+
### External Variables
38+
39+
#### Differential
40+
None.
41+
42+
#### Algebraic
43+
Symbol | Units | Description | Note
44+
------------|---------|---------------------------------| ------
45+
$V_r$ | [p.u.] | Terminal voltage, real component | owned by bus object
46+
$V_i$ | [p.u.] | Terminal voltage, imaginary component | owned by bus object
47+
48+
49+
## Model Equations
50+
51+
### Differential Equations
52+
None.
53+
54+
### Algebraic Equations
55+
``` math
56+
\begin{aligned}
57+
0 &= -I_{r} + U (-G V_{r} + B V_{i}) \\
58+
0 &= -I_{i} + U (-B V_{r} - G V_{i})
59+
\end{aligned}
60+
```

src/Model/PhasorDynamics/Load/README.md

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,62 @@
22

33
Load modeling is one of the more complex aspects of power system dynamics.
44
The simplest model, which is used for this challenge problem, is to model
5-
the load as a complex shunt impedance with the impedance given by:
5+
the load as a complex shunt impedance $$ R + jX $$.
6+
7+
8+
## Model Parameters
9+
10+
Symbol | Units | Description | Note
11+
------------|---------|---------------------------------| ------
12+
$R$ | [p.u.] | Load resistance |
13+
$X$ | [p.u.] | Load reactance |
14+
15+
16+
### Model Derived Parameters
617
``` math
7-
Z = R + jX
8-
```
9-
where $`R`$ is the load resistance, $`X`$ is the load reactance. The current
10-
drawn by the load is then obtained as
11-
```math
12-
I_{\mathrm{load}} = \frac{V_{\mathrm{bus}}}{Z},
18+
\begin{aligned}
19+
G &=\dfrac{R}{R^2 + X^2} \\
20+
B &= -\dfrac{X}{R^2 + X^2}\\
21+
\end{aligned}
1322
```
14-
where $`V_{bus}`$ is the voltage on the bus to which the load is connected.
1523

16-
After some algebra, one obtains expressions for real and imaginary components
17-
for the currents entering the bus:
18-
```math
19-
I_{r} = -g V_{r} + b V_{i}
20-
```
2124

22-
```math
23-
I_{i} = - b V_{r} - g V_{i}
24-
```
25-
where
26-
```math
27-
g = \frac{R}{R^2+X^2} ~~~\mathrm{and}~~~ b = \frac{-X}{R^2+X^2}.
25+
## Model Variables
26+
27+
### Internal Variables
28+
29+
#### Differential
30+
None.
31+
32+
#### Algebraic
33+
34+
Symbol | Units | Description | Note
35+
------------|---------|---------------------------------| ------
36+
$I_r$ | [p.u.] | Terminal current, real component | Read by bus
37+
$I_i$ | [p.u.] | Terminal current, imaginary component | Read by bus
38+
39+
40+
### External Variables
41+
42+
#### Differential
43+
None.
44+
45+
#### Algebraic
46+
Symbol | Units | Description | Note
47+
------------|---------|---------------------------------| ------
48+
$V_r$ | [p.u.] | Terminal voltage, real component | owned by bus object
49+
$V_i$ | [p.u.] | Terminal voltage, imaginary component | owned by bus object
50+
51+
52+
## Model Equations
53+
54+
### Differential Equations
55+
None.
56+
57+
### Algebraic Equations
58+
``` math
59+
\begin{aligned}
60+
0 &= I_{r} +G V_{r} - B V_{i} \\
61+
0 &= I_{i} +B V_{r} + G V_{i}
62+
\end{aligned}
2863
```

0 commit comments

Comments
 (0)