Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GridKit/CommonMath.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ We implement an approximation to $\text{ReQU}$ using the logistic function.
x & x\gt y \\[0pt]
y & x\le y
\end{cases} \\[0pt]
&=y+\text{ReLU}(x-y)=\approx y+\rho(x-y)
&=y+\text{ReLU}(x-y)\approx y+\rho(x-y)
\end{aligned}
```

Expand Down
1 change: 1 addition & 0 deletions GridKit/LinearAlgebra/Vector/Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ namespace GridKit
* Use this function if you update vector elements by accessing the raw data
* pointer.
*
* @param[in] j - Index of a vector in multivector
* @param[in] memspace - Memory space (HOST or DEVICE)
*
* @warning This is an expert level method. Use only if you know what
Expand Down
4 changes: 2 additions & 2 deletions GridKit/Model/EMT/Bus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`Bus` represents an $N$-phase bus in instantaneous phase coordinates. It owns
the bus voltage and contributes the current-balance residual to
the assembled DAE. $`\mathcal{D}`$ denotes the set of connected devices.
the assembled DAE. $\mathcal{D}$ denotes the set of connected devices.
Bus voltage and its residual are algebraic when no connected model contributes
a voltage derivative; see [assembly](../README.md#assembly).

Expand All @@ -24,7 +24,7 @@ $N$ | [-] | `N` | Number of phases | Required, positive integer
N \in \mathbb{Z}_{>0}
```

### Derived Parameters
### Model Derived Parameters

None.

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/EMT/Component/Line/LineDistributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ K &\in \mathbb{Z}_{>0} \\
\end{aligned}
```

### Derived Parameters
### Model Derived Parameters

```math
P_{\phi,nk} =
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/EMT/Component/Line/LineLumped/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ K &\in \mathbb{Z}_{>0} \\
\end{aligned}
```

### Derived Parameters
### Model Derived Parameters

```math
P_{\phi,nk} =
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/EMT/Component/Load/LoadZ/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $N$ | [-] | `N` | Number of phases | Required, positive integer
N \in \mathbb{Z}_{>0}
```

### Derived Parameters
### Model Derived Parameters

None.

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/EMT/Component/Source/VoltageSource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ N &\in \mathbb{Z}_{>0} \\
\end{aligned}
```

### Derived Parameters
### Model Derived Parameters

Define the phase-index set

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/EMT/Component/Switch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $N$ | [-] | `N` | Number of phases | Required, positive integer
N \in \mathbb{Z}_{>0}
```

### Derived Parameters
### Model Derived Parameters

None.

Expand Down
4 changes: 2 additions & 2 deletions GridKit/Model/EMT/Operators/Rational/StateSpace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the pole-index set

```math
\mathbf{H}(s) \approx \mathbf{D} + s\mathbf{E}
+ \mathbf{C}\dfrac{\mathbf{I}}{s\mathbf{I}-\mathbf{P}}\mathbf{B}
+ \mathbf{C}(s\mathbf{I}-\mathbf{P})^{-1}\mathbf{B}
```

> [!NOTE]
Expand Down Expand Up @@ -80,7 +80,7 @@ p_{q+1} &= p_q^{\ast},
\end{aligned}
```

### Derived Parameters
### Model Derived Parameters

```math
\begin{aligned}
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/EMT/Operators/Rational/VectorFit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ p_{q+1} &= p_q^{\ast},
\end{aligned}
```

### Derived Parameters
### Model Derived Parameters

```math
\begin{aligned}
Expand Down
6 changes: 3 additions & 3 deletions GridKit/Model/EMT/Operators/Shift/Delay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ M &\in \mathbb{Z}_{>0} \\
\end{aligned}
```

### Derived Parameters
### Model Derived Parameters

```math
\tau_{\min} = \min(\boldsymbol{\tau}),
Expand Down Expand Up @@ -112,7 +112,7 @@ Accepted input history is stored as the knot sequence

```math
(t_j,\ \mathbf{u}_j,\ \mathbf{u}'_j),
\qquad 0 = t_0 < t_1 < \cdots < t_n,
\qquad 0 = t_0 < t_1 < \cdots < t_n
```

where $\mathbf{u}_j$ and $\mathbf{u}'_j$ are the input value and derivative at
Expand Down Expand Up @@ -145,7 +145,7 @@ u(\xi)
+ \theta(1-\theta)^2\,h_j\,u'_j \\
&\quad
+ \theta^2(3-2\theta)\,u_{j+1}
- \theta^2(1-\theta)\,h_j\,u'_{j+1},
- \theta^2(1-\theta)\,h_j\,u'_{j+1}
\end{aligned}
```

Expand Down
4 changes: 2 additions & 2 deletions GridKit/Model/EMT/Operators/Shift/Propagation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ delay per mode, and a fitted output factor while preserving the input units.
\end{aligned}
```

With $`\mathbf{G}_\mathrm{in}`$ and $`\mathbf{G}_\mathrm{out}`$ the transfer matrices
With $\mathbf G_\mathrm{in}$ and $\mathbf G_\mathrm{out}$ the transfer matrices
of the input and output factors,

```math
Expand All @@ -37,7 +37,7 @@ $K$ | [-] | `K` | Signal dimension | Required, positive integer
K \in \mathbb{Z}_{>0}
```

### Derived Parameters
### Model Derived Parameters

The full modal basis has one mode per channel:

Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Branch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contributions are oriented entering the adjacent buses.
- Setting $\tau = 1$ and $\theta = 0$ gives the ordinary symmetric
transmission-line $\pi$ model.
- The total line shunt $G + jB$ is split equally between the two terminals,
while the magnetizing shunt $`G_\mathrm{mag} + jB_\mathrm{mag}`$ is connected at
while the magnetizing shunt $G_\mathrm{mag} + jB_\mathrm{mag}$ is connected at
bus 1; both shunts are added outside the $\mathbf{M}$ transformation.
- The branch has no solver-owned variables; it contributes current residuals
directly to the connected buses.
Expand Down
9 changes: 6 additions & 3 deletions GridKit/Model/PhasorDynamics/Controller/REECB/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ Initialization resolves the steady-state quantities in dependency order; all
internal derivatives start at zero. Initialize the component-base commands:
$I_p\leftarrow k_\mathrm{base}I_p^\mathrm{cmd}$ and
$I_q\leftarrow k_\mathrm{base}I_q^\mathrm{cmd}$.
REECB's `iclamp` helper inverts the CommonMath [clamp](../../../../CommonMath.md#clamp)
during initialization. At a bound, REECB uses an outward offset
REECB's `iclamp` helper inverts the smooth CommonMath
[clamp](../../../../CommonMath.md#clamp) during initialization.
At a bound, REECB uses an outward offset
$\delta=-\ln(\text{expm1}(\mu\epsilon_\mathrm{init}/2))/\mu$ to keep the clamp error
within $\epsilon_\mathrm{init}$; collapsed bounds return the bound.

Expand Down Expand Up @@ -290,6 +291,8 @@ operating point is rejected if no finite solution exists or the
reactive-current injection is incompatible. Q, V, and P limits are expanded as
needed; each adjustment logs a warning. This matches PowerWorld's default
`Modify Limits and Run` treatment of initial limit violations.
This preserves the supplied operating point for steady-state initialization;
subsequent simulation uses the adjusted limits.

```math
\begin{aligned}
Expand Down Expand Up @@ -376,7 +379,7 @@ For $\ell<0<u$, REECB uses

```math
\text{aslew}(f;\ell,u)
=\dfrac{f}{1+\rho(f/u-1)+\rho(f/\ell-1)},
=\dfrac{f}{1+\rho(f/u-1)+\rho(f/\ell-1)}
```

where $\rho$ is GridKit's smooth
Expand Down
8 changes: 5 additions & 3 deletions GridKit/Model/PhasorDynamics/Controller/REPCA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ REPCA reconstructs a steady operating point; arbitrary-state restart is unsuppor

### Internal Initialization

Initialization uses `invertClamp` and `invertDeadband` to invert the CommonMath
[clamp](../../../../CommonMath.md#clamp) and [Type II deadband](../../../../CommonMath.md#type-ii-deadband).
`iclamp` and `ideadband2` denote the initialization helpers `invertClamp` and
`invertDeadband`, which recover inputs for the smooth CommonMath
[clamp](../../../../CommonMath.md#clamp) and
[Type II deadband](../../../../CommonMath.md#type-ii-deadband) functions.
Within $10^{-12}$ of a clamp bound, REPCA uses that
bound moved outward by $0.1$; intervals of width at most $10^{-12}$ return
$\ell$. Deadband outputs within $10^{-12}$ of zero use the midpoint; other
Expand Down Expand Up @@ -330,7 +332,7 @@ Monitor | Units | Description | Note

```math
\text{droop}(e;D_\mathrm{dn},D_\mathrm{up})
=e\left[D_\mathrm{dn}+(D_\mathrm{up}-D_\mathrm{dn})\sigma(e)\right],
=e\left[D_\mathrm{dn}+(D_\mathrm{up}-D_\mathrm{dn})\sigma(e)\right]
```

where $\sigma$ is GridKit's smooth
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Exciter/ESDC1A/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A valid ESDC1A parameter set must satisfy the following conditions:
The saturation points are either disabled together,

```math
S_E(E_1) = S_E(E_2) = 0,
S_E(E_1) = S_E(E_2) = 0
```

or define a valid two-point scaled-quadratic fit:
Expand Down
2 changes: 1 addition & 1 deletion GridKit/Model/PhasorDynamics/Governor/GASTPTI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ s^{\mathrm{valve}}
\begin{cases}
(
V_T-\text{iramp}\!(m_T),
x_F,
x_F
)
& s^{\mathrm{valve}}=1 \\
(
Expand Down
24 changes: 19 additions & 5 deletions GridKit/Model/PhasorDynamics/Governor/GGOV1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,25 @@ A valid GGOV1 parameter set must satisfy the following conditions:

```math
\begin{aligned}
&P^{\mathrm{rate}}\ge 0,\quad R\gt 0,\quad I_R\in\{-2,-1,1\},\quad s_\mathrm{flag}\in\{0,1\} \\
&T_\mathrm{pelec},T_\mathrm{dgov},T_B,T_C,T_\mathrm{eng},T_\mathrm{fload},T_A,T_\mathrm{sa},T_\mathrm{sb}\ge 0,\quad T_\mathrm{act}\gt 0 \\
&T_B \gt 0\quad\text{or}\quad(T_B = 0\ \text{and}\ T_C = 0) \\
&e^{\min}\le e^{\max},\quad V^{\min}\le V^{\max},\quad R_\mathrm{close}\lt 0\lt R_\mathrm{open} \\
&K_\mathrm{turb}\gt 0
P^{\mathrm{rate}} &\ge 0,\quad R \gt 0,\quad K_\mathrm{turb} \gt 0 \\
I_R &\in \{-2,-1,1\},\quad s_\mathrm{flag} \in \{0,1\}
\end{aligned}
```

```math
\begin{aligned}
T_\mathrm{pelec}, T_\mathrm{dgov}, T_\mathrm{eng}, T_\mathrm{fload} &\ge 0 \\
T_A, T_\mathrm{sa}, T_\mathrm{sb}, T_C &\ge 0 \\
T_\mathrm{act} &\gt 0 \\
T_B &\gt 0\quad\text{or}\quad T_B = T_C = 0
\end{aligned}
```

```math
\begin{aligned}
e^{\min} &\le e^{\max} \\
V^{\min} &\le V^{\max} \\
R_\mathrm{close} &\lt 0 \lt R_\mathrm{open}
\end{aligned}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Sixth-order round-rotor synchronous machine. See the [shared conventions](../REA
## Block Diagram
![](../../../../../docs/Figures/GENROU.JPG)

Figure 2: GENROU. Figure courtesy of
Figure 1: GENROU. Figure courtesy of
[PowerWorld](https://www.powerworld.com/WebHelp/)

## Model Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Fifth-order salient-pole synchronous machine. See the [shared conventions](../RE
## Block Diagram
![](../../../../../docs/Figures/GENSAL.JPG)

Figure 2: GENSAL. Figure courtesy of
Figure 1: GENSAL. Figure courtesy of
[PowerWorld](https://www.powerworld.com/WebHelp/)

## Model Parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/GridKit/Model/PhasorDynamics/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PhasorDynamics

```{toctree}
:maxdepth: 4
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

Input Format <INPUT_FORMAT>
Branch <Branch/README>
Expand Down
6 changes: 4 additions & 2 deletions docs/GridKit/Model/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Models

Browse models by family, or see the shared mathematical functions.

```{toctree}
:maxdepth: 4
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

CommonMath <../CommonMath>
EMT <EMT/README>
Expand Down
6 changes: 6 additions & 0 deletions docs/_static/css/gridkit.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
background: #fff;
padding: 0.5rem;
}

.gk-index > ul {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
gap: 0.4rem 1.5rem;
}
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```{toctree}
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

GridKit Core <api/reference/namespace_GridKit>
Solvers <api/reference/namespace_AnalysisManager>
Expand Down
4 changes: 2 additions & 2 deletions docs/application/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Applications

```{toctree}
:maxdepth: 3
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index
Comment thread
pelesh marked this conversation as resolved.

Phasor Dynamics <PhasorDynamics/README>
```
4 changes: 2 additions & 2 deletions docs/development/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Development

```{toctree}
:maxdepth: 2
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

Contributing <CONTRIBUTING>
Buildsystem <buildsystem/README>
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/PhasorDynamics/Validation/Toy/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Toy

```{toctree}
:maxdepth: 4
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

TwoBusBasic <TwoBusBasic/README>
TwoBusTgov1 <TwoBusTgov1/README>
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/PowerElectronics/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PowerElectronics

```{toctree}
:maxdepth: 4
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

Microgrid <Microgrid/README>
ScaleMicrogrid <ScaleMicrogrid/README>
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/PowerFlow/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PowerFlow

```{toctree}
:maxdepth: 4
:maxdepth: 1
:titlesonly:
:hidden:
:class: gk-index

Grid3Bus <Grid3Bus/README>
```
Loading