From 925f7d433323c6af18e88467e8008e0551b0a5e2 Mon Sep 17 00:00:00 2001 From: abdourahmanbarry Date: Thu, 24 Sep 2026 21:43:04 +0000 Subject: [PATCH 1/3] Fixed documentation issues in PowerElectronics --- .../DistributedGenerator/README.md | 12 ++++----- .../PowerElectronics/MicrogridBusDQ/README.md | 8 +++--- .../PowerElectronics/MicrogridLine/README.md | 14 +++++----- .../PowerElectronics/MicrogridLoad/README.md | 10 +++---- GridKit/Model/PowerElectronics/README.md | 26 +++++++++---------- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/GridKit/Model/PowerElectronics/DistributedGenerator/README.md b/GridKit/Model/PowerElectronics/DistributedGenerator/README.md index 5b4f32c2aa..4fd95a1df8 100644 --- a/GridKit/Model/PowerElectronics/DistributedGenerator/README.md +++ b/GridKit/Model/PowerElectronics/DistributedGenerator/README.md @@ -11,7 +11,7 @@ Parameters: + $K_{pv}$ - PI Controller Parameter in 1 & 2 + $K_{iv}$ - PI Controller Parameter in 1 & 2 + $K_{pc}$ - PI Controller Parameter in 1 & 2 - + $C_f$ - Shunt?? + + $C_f$ - LC-filter capacitance + $r_{Lf}$ - Resistance of line f + $L_{f}$ - Inductance of line f + $r_{Lc}$ - Resistance of line c @@ -38,10 +38,10 @@ Variables (Internal): + $i_{od}$ - Current of Line o (dq-space) + $i_{oq}$ - Current of Line o (dq-space) -Equations (External, Residuals): +Component external contributions: + $\omega_{com} - \omega$    (If this generator is considered the reference one, otherwise 0) - + $\cos(\delta) i_{od} - \sin(\delta) i_{oq}$ - + $\sin(\delta) i_{od} + \cos(\delta) i_{oq}$ + + $\cos(\delta) i_{od} - \sin(\delta) i_{oq}$    (Bus residual terms) + + $\sin(\delta) i_{od} + \cos(\delta) i_{oq}$    (Bus residual terms) Equations (Internal): + $\omega_{com} = \omega_{b} - m_{p} P$ @@ -70,5 +70,5 @@ Equations (Internal): Note all internal direct equalities are simplified into the differential equations. -1. Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625. -2. Bidram, Ali, Frank L. Lewis, and Ali Davoudi. "Distributed control systems for small-scale power networks: Using multiagent cooperative control theory." IEEE Control systems magazine 34.6 (2014): 56-77. +[^1]: Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625. +[^2]: Bidram, Ali, Frank L. Lewis, and Ali Davoudi. "Distributed control systems for small-scale power networks: Using multiagent cooperative control theory." IEEE Control systems magazine 34.6 (2014): 56-77. diff --git a/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md b/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md index 076f4eaf73..7e3ad006cb 100644 --- a/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md @@ -2,15 +2,15 @@ The bus model used for the microgrid found in Pogaku et al.[^1] and Bidram et al.[^2] Parameters: - + $RN$ - Virtual Resistance + + $R_N$ - Virtual Resistance Variables (External): + $v_{D}$ - Bus voltage along direct axis + $v_{Q}$ - Bus voltage along quadrature axis -Equations (External, Residuals): - + $\frac{-v_D}{RN}$ - + $\frac{-v_Q}{RN}$ +Component external contributions: + + $\frac{-v_D}{R_N}$ + + $\frac{-v_Q}{R_N}$ There are no internal variables to this system. Only residuals to be added from existing externals. As $RN \rightarrow \infty$ then the bus represent Kirchhoff's current law. diff --git a/GridKit/Model/PowerElectronics/MicrogridLine/README.md b/GridKit/Model/PowerElectronics/MicrogridLine/README.md index b7a7462da7..a17a3f2436 100644 --- a/GridKit/Model/PowerElectronics/MicrogridLine/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridLine/README.md @@ -14,17 +14,17 @@ Variables (External): + $i_{D}$ - Line Current (D) + $i_{Q}$ - Line Current (Q) -Equations (External, Residuals): +Component external contributions: + $0$    (Reference Rotor Residual) - + $-i_{D}$    (Bus 1 Residuals) - + $-i_{Q}$ - + $i_{D}$    (Bus 2 Residuals) - + $i_{Q}$ + + $-i_{D}$    (Bus 1 residual term) + + $-i_{Q}$    (Bus 1 residual term) + + $i_{D}$    (Bus 2 residual term) + + $i_{Q}$    (Bus 2 residual term) Equations (Internal): + $\frac{di_{D}}{dt} = -(\frac{R}{L}) i_{D} + \omega_{ref} i_{Q} + \frac{v_{D1} - v_{D2}}{L}$ + $\frac{di_{Q}}{dt} = -(\frac{R}{L}) i_{Q} + \omega_{ref} i_{D} + \frac{v_{Q1} - v_{Q2}}{L}$ -1. Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625. -2. Bidram, Ali, Frank L. Lewis, and Ali Davoudi. "Distributed control systems for small-scale power networks: Using multiagent cooperative control theory." IEEE Control systems magazine 34.6 (2014): 56-77. +[^1]: Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625. +[^2]: Bidram, Ali, Frank L. Lewis, and Ali Davoudi. "Distributed control systems for small-scale power networks: Using multiagent cooperative control theory." IEEE Control systems magazine 34.6 (2014): 56-77. diff --git a/GridKit/Model/PowerElectronics/MicrogridLoad/README.md b/GridKit/Model/PowerElectronics/MicrogridLoad/README.md index 9c24bf0df4..7dcc0a3e98 100644 --- a/GridKit/Model/PowerElectronics/MicrogridLoad/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridLoad/README.md @@ -12,10 +12,10 @@ Variables (External): + $i_{D}$ - Line Current (D) + $i_{Q}$ - Line Current (Q) -Equations (External, Residuals): +Component external contributions: + $0$    (Reference Rotor Residual) - + $-i_{D}$    (Bus Residuals) - + $-i_{Q}$ + + $-i_{D}$    (Bus residual term) + + $-i_{Q}$    (Bus residual term) Equations (Internal): + $\frac{di_{D}}{dt} = -(\frac{R}{L}) i_{D} + \omega_{ref} i_{Q} + \frac{v_{D1} - v_{D2}}{L}$ @@ -23,5 +23,5 @@ Equations (Internal): -1. Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625. -2. Bidram, Ali, Frank L. Lewis, and Ali Davoudi. "Distributed control systems for small-scale power networks: Using multiagent cooperative control theory." IEEE Control systems magazine 34.6 (2014): 56-77. +[^1]: Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625. +[^2]: Bidram, Ali, Frank L. Lewis, and Ali Davoudi. "Distributed control systems for small-scale power networks: Using multiagent cooperative control theory." IEEE Control systems magazine 34.6 (2014): 56-77. diff --git a/GridKit/Model/PowerElectronics/README.md b/GridKit/Model/PowerElectronics/README.md index c4f88acecb..4836626294 100644 --- a/GridKit/Model/PowerElectronics/README.md +++ b/GridKit/Model/PowerElectronics/README.md @@ -14,27 +14,27 @@ The composer suppose Jacobian constructions as well. Example with two components is as follows. Component 1: -```math +$$ \begin{align} - 0 = f_1\left(\frac{dy_{1}}{dt}, y_1 , w \right) & \qquad \text{(Internal Equations Residual)}\\ - c_1(y_1, w) & \qquad \text{(External Coupling Term)}\\ + 0 =& f_1\left(\frac{dy_{1}}{dt}, y_1 , w \right) && \qquad \text{(Internal Equations Residual)}\\ + & c_1(y_1, w) && \qquad \text{(External Coupling Term)}\\ \end{align} -``` +$$ Component 2: -```math +$$ \begin{align} - 0 = f_2\left(\frac{dy_{2}}{dt}, y_2 ,w\right) & \qquad \text{(Internal Equations Residual)}\\ - c_2(y_2,w) & \qquad \text{(External Coupling Term)}\\ + 0 =& f_2\left(\frac{dy_{2}}{dt}, y_2 ,w\right) && \qquad \text{(Internal Equations Residual)}\\ + &c_2(y_2,w) && \qquad \text{(External Coupling Term)}\\ \end{align} -``` +$$ The composition of components 1 and 2: -```math +$$ \begin{align} - 0 = f_1\left(\frac{dy_{1}}{dt}, y_1 ,w\right) & \qquad \text{(Internal Equations Residuals)}\\ - 0 = f_2\left(\frac{dy_{2}}{dt}, y_2 ,w\right) &\\ - 0 = c_1(y_1, w) + c_2(y_2,w) & \qquad \text{(External Coupling Residuals)}\\ + 0 =& f_1\left(\frac{dy_{1}}{dt}, y_1 ,w\right) && \qquad \text{(Internal Equations Residuals)}\\ + 0 =& f_2\left(\frac{dy_{2}}{dt}, y_2 ,w\right) &&\\ + 0 =& c_1(y_1, w) + c_2(y_2,w) && \qquad \text{(External Coupling Residuals)}\\ \end{align} -``` +$$ Note the dimensions of $y$ can be $0$ if there are no internal equations (an example seen in Resistors and MicrogridBus). From 5cf5b7c024c77f70736c6d2fae306022e3762e6a Mon Sep 17 00:00:00 2001 From: abdourahmanbarry Date: Tue, 29 Sep 2026 18:16:04 +0000 Subject: [PATCH 2/3] Update documentation --- .../DistributedGenerator/README.md | 6 +-- .../PowerElectronics/MicrogridBusDQ/README.md | 2 +- .../PowerElectronics/MicrogridLine/README.md | 6 +-- .../PowerElectronics/MicrogridLoad/README.md | 6 +-- GridKit/Model/PowerElectronics/README.md | 37 ++++++++++++------- 5 files changed, 34 insertions(+), 23 deletions(-) diff --git a/GridKit/Model/PowerElectronics/DistributedGenerator/README.md b/GridKit/Model/PowerElectronics/DistributedGenerator/README.md index 4fd95a1df8..616d1d3e95 100644 --- a/GridKit/Model/PowerElectronics/DistributedGenerator/README.md +++ b/GridKit/Model/PowerElectronics/DistributedGenerator/README.md @@ -1,5 +1,5 @@ -The Distributed Generator Component found in references 1 and 2. +The Distributed Generator Component found in Pogaku et al.[^1] and Bidram et al.[^2]. Parameters: + $\omega_b$ - Reference Rotating Frame @@ -38,12 +38,12 @@ Variables (Internal): + $i_{od}$ - Current of Line o (dq-space) + $i_{oq}$ - Current of Line o (dq-space) -Component external contributions: +Contributions to external equations: + $\omega_{com} - \omega$    (If this generator is considered the reference one, otherwise 0) + $\cos(\delta) i_{od} - \sin(\delta) i_{oq}$    (Bus residual terms) + $\sin(\delta) i_{od} + \cos(\delta) i_{oq}$    (Bus residual terms) -Equations (Internal): +Internal equations: + $\omega_{com} = \omega_{b} - m_{p} P$ + $\frac{d\delta}{dt} = \omega_{com} - \omega$ + $\frac{dP}{dt} = \omega_c ( v_{od} i_{od} + v_{oq} i_{oq} - P)$ diff --git a/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md b/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md index 7e3ad006cb..50f4e24768 100644 --- a/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md @@ -8,7 +8,7 @@ Variables (External): + $v_{D}$ - Bus voltage along direct axis + $v_{Q}$ - Bus voltage along quadrature axis -Component external contributions: +Contributions to external equations: + $\frac{-v_D}{R_N}$ + $\frac{-v_Q}{R_N}$ diff --git a/GridKit/Model/PowerElectronics/MicrogridLine/README.md b/GridKit/Model/PowerElectronics/MicrogridLine/README.md index a17a3f2436..8620e7d0b2 100644 --- a/GridKit/Model/PowerElectronics/MicrogridLine/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridLine/README.md @@ -1,5 +1,5 @@ -The Line used for the Microgrid found in references 1 and 2. +The Line used for the Microgrid found in Pogaku et al.[^1] and Bidram et al.[^2]. Parameters: + $R$ - Resistance @@ -14,14 +14,14 @@ Variables (External): + $i_{D}$ - Line Current (D) + $i_{Q}$ - Line Current (Q) -Component external contributions: +Contributions to external equations: + $0$    (Reference Rotor Residual) + $-i_{D}$    (Bus 1 residual term) + $-i_{Q}$    (Bus 1 residual term) + $i_{D}$    (Bus 2 residual term) + $i_{Q}$    (Bus 2 residual term) -Equations (Internal): +Internal equations: + $\frac{di_{D}}{dt} = -(\frac{R}{L}) i_{D} + \omega_{ref} i_{Q} + \frac{v_{D1} - v_{D2}}{L}$ + $\frac{di_{Q}}{dt} = -(\frac{R}{L}) i_{Q} + \omega_{ref} i_{D} + \frac{v_{Q1} - v_{Q2}}{L}$ diff --git a/GridKit/Model/PowerElectronics/MicrogridLoad/README.md b/GridKit/Model/PowerElectronics/MicrogridLoad/README.md index 7dcc0a3e98..375c7e1591 100644 --- a/GridKit/Model/PowerElectronics/MicrogridLoad/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridLoad/README.md @@ -1,5 +1,5 @@ -The Load used for the Microgrid found in references 1 and 2. +The Load used for the Microgrid found in Pogaku et al.[^1] and Bidram et al.[^2]. Parameters: + $R$ - Resistance @@ -12,12 +12,12 @@ Variables (External): + $i_{D}$ - Line Current (D) + $i_{Q}$ - Line Current (Q) -Component external contributions: +Contributions to external equations: + $0$    (Reference Rotor Residual) + $-i_{D}$    (Bus residual term) + $-i_{Q}$    (Bus residual term) -Equations (Internal): +Internal equations: + $\frac{di_{D}}{dt} = -(\frac{R}{L}) i_{D} + \omega_{ref} i_{Q} + \frac{v_{D1} - v_{D2}}{L}$ + $\frac{di_{Q}}{dt} = -(\frac{R}{L}) i_{Q} + \omega_{ref} i_{D} + \frac{v_{Q1} - v_{Q2}}{L}$ diff --git a/GridKit/Model/PowerElectronics/README.md b/GridKit/Model/PowerElectronics/README.md index 4836626294..70b72afa4f 100644 --- a/GridKit/Model/PowerElectronics/README.md +++ b/GridKit/Model/PowerElectronics/README.md @@ -14,27 +14,38 @@ The composer suppose Jacobian constructions as well. Example with two components is as follows. Component 1: + $$ -\begin{align} - 0 =& f_1\left(\frac{dy_{1}}{dt}, y_1 , w \right) && \qquad \text{(Internal Equations Residual)}\\ - & c_1(y_1, w) && \qquad \text{(External Coupling Term)}\\ -\end{align} +\begin{aligned} +0 &= f_1\left(\frac{dy_1}{dt}, y_1, w\right) + &\qquad& \text{(Internal Equations Residual)} \\ + &c_1(y_1,w) + &\qquad& \text{(External Coupling Term)} +\end{aligned} $$ + Component 2: + $$ -\begin{align} - 0 =& f_2\left(\frac{dy_{2}}{dt}, y_2 ,w\right) && \qquad \text{(Internal Equations Residual)}\\ - &c_2(y_2,w) && \qquad \text{(External Coupling Term)}\\ -\end{align} +\begin{aligned} +0 &= f_2\left(\frac{dy_2}{dt}, y_2, w\right) + &\qquad& \text{(Internal Equations Residual)} \\ + &c_2(y_2,w) + &\qquad& \text{(External Coupling Term)} +\end{aligned} $$ The composition of components 1 and 2: + $$ -\begin{align} - 0 =& f_1\left(\frac{dy_{1}}{dt}, y_1 ,w\right) && \qquad \text{(Internal Equations Residuals)}\\ - 0 =& f_2\left(\frac{dy_{2}}{dt}, y_2 ,w\right) &&\\ - 0 =& c_1(y_1, w) + c_2(y_2,w) && \qquad \text{(External Coupling Residuals)}\\ -\end{align} +\begin{aligned} +0 &= f_1\left(\frac{dy_1}{dt}, y_1,w\right) + &\qquad& \text{(Internal Equations Residuals)} \\ +0 &= f_2\left(\frac{dy_2}{dt}, y_2,w\right) + & & \\ +0 &= c_1(y_1,w) + c_2(y_2,w) + &\qquad& \text{(External Coupling Residuals)} +\end{aligned} $$ Note the dimensions of $y$ can be $0$ if there are no internal equations (an example seen in Resistors and MicrogridBus). From 30c02c841f9e62eab9a4d993ec4337f32f914a55 Mon Sep 17 00:00:00 2001 From: abdourahmanbarry Date: Tue, 29 Sep 2026 18:27:38 +0000 Subject: [PATCH 3/3] Update RN to R_N --- GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md b/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md index 50f4e24768..65440198ea 100644 --- a/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md +++ b/GridKit/Model/PowerElectronics/MicrogridBusDQ/README.md @@ -12,7 +12,7 @@ Contributions to external equations: + $\frac{-v_D}{R_N}$ + $\frac{-v_Q}{R_N}$ -There are no internal variables to this system. Only residuals to be added from existing externals. As $RN \rightarrow \infty$ then the bus represent Kirchhoff's current law. +There are no internal variables to this system. Only residuals to be added from existing externals. As $R_N \rightarrow \infty$ then the bus represent Kirchhoff's current law. [^1]: Pogaku, Nagaraju, Milan Prodanovic, and Timothy C. Green. "Modeling, analysis and testing of autonomous operation of an inverter-based microgrid." IEEE Transactions on power electronics 22.2 (2007): 613-625.