Skip to content

Commit 860d493

Browse files
committed
Started README files for PowerElectronics + Examples
1 parent f33d600 commit 860d493

File tree

7 files changed

+212
-0
lines changed

7 files changed

+212
-0
lines changed

examples/Microgrid/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
3+
The model is formed from the example provided in Figure 1 of reference 1. Composed with equations derived from both 1 & 2. Parameters are given by Table 1 in reference 1. Reference solution is generated from MATLAB code implementation with tight tolerances. Utilizes the PowerElectronicsModel composer framework.
4+
5+
6+
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.
7+
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.

examples/ScaleMicrogrid/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
The model is an expanded form of the model in reference 1 and 2. Utilizes the PowerElectronicsModel composer framework. Given a free parameter $N \ge 1$ then the amount of components the system have are as follows.
4+
+ Discrete Generators : $2N$
5+
+ Microgrid Lines : $2N-1$
6+
+ Microgrid Loads : $N$
7+
+ Microgrid Buses : $N$
8+
9+
When $N=2$ the original case in reference 1 is constructed.
10+
All parameters are given by duplicating the parameters in reference 1 over the extended system. The system extends by connecting new systems over the even indexed buses.
11+
Reference solutions are provided for the cases of when $N=\{2, 4, 8\}$. These are generated from a MATLAB based code with tight tolerances.
12+
13+
14+
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.
15+
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.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
2+
The Distributed Generator Component found in references 1 and 2.
3+
4+
Parameters:
5+
+ $\omega_b$ - Reference Rotating Frame
6+
+ $\omega_c$ - Cutoff Frequency
7+
+ $m_p$ - Drop Gain, Frequency Range
8+
+ $V_n$ - Nominal Set Point of D-Axis Output Voltage
9+
+ $n_q$ - Voltage Range
10+
+ $F$ - PI Controller Parameter in 1 & 2
11+
+ $K_{pv}$ - PI Controller Parameter in 1 & 2
12+
+ $K_{iv}$ - PI Controller Parameter in 1 & 2
13+
+ $K_{pc}$ - PI Controller Parameter in 1 & 2
14+
+ $C_f$ - Shunt??
15+
+ $r_{Lf}$ - Resistance of line f
16+
+ $L_{f}$ - Inductance of line f
17+
+ $r_{Lc}$ - Resistance of line c
18+
+ $L_{c}$ - Inductance of line c
19+
20+
Variables (External):
21+
+ $\omega_{ref}$ - Network reference $\omega$
22+
+ $V_{a}$ - Incoming Bus Voltage (a)
23+
+ $V_{b}$ - Incoming Bus Voltage (b)
24+
25+
Variables (Internal):
26+
+ $\delta$ - Rotor difference from reference
27+
+ $\omega$ - Frequency
28+
+ $P$ - Real Power
29+
+ $Q$ - Reactive Power
30+
+ $\phi_{d}$ - Output Voltage Control PI Variable
31+
+ $\phi_{q}$ - Output Voltage Control PI Variable
32+
+ $\gamma_{d}$ - Output Current Control PI Variable
33+
+ $\gamma_{q}$ - Output Current Control PI Variable
34+
+ $i_{ld}$ - Current of Line l (dq-space)
35+
+ $i_{lq}$ - Current of Line l (dq-space)
36+
+ $v_{od}$ - Voltage of Bus o (dq-space)
37+
+ $v_{oq}$ - Voltage of Bus o (dq-space)
38+
+ $i_{od}$ - Current of Line o (dq-space)
39+
+ $i_{oq}$ - Current of Line o (dq-space)
40+
41+
Equations (External, Residuals):
42+
+ $\omega_{com} - \omega$    (If this generator is considered the reference one, otherwise 0)
43+
+ $\cos(\delta) i_{od} - \sin(\delta) i_{oq}$
44+
+ $\sin(\delta) i_{od} + \cos(\delta) i_{oq}$
45+
46+
Equations (Internal):
47+
+ $\omega_{com} = \omega_{b} - m_{p} P$
48+
+ $\frac{d\delta}{dt} = \omega_{com} - \omega$
49+
+ $\frac{dP}{dt} = \omega_c ( v_{od} i_{od} + v_{oq} i_{oq} - P)$
50+
+ $\frac{dQ}{dt} = \omega_c ( v_{od} i_{oq} + v_{oq} i_{od} - Q)$
51+
+ $v_{od}^* = V_{n} - n_q Q$
52+
+ $v_{oq}^* = 0$
53+
+ $\frac{d\phi_{d}}{dt} = v_{od}^* - v_{od}$
54+
+ $\frac{d\phi_{q}}{dt} = v_{oq}^* - v_{oq}$
55+
+ $i_{ld}^* = F i_{od} - \omega_{b} C_{f} v_{oq} + K_{pv} (v_{od}^* - v_{od}) + K_{iv} \phi_{d}$
56+
+ $i_{lq}^* = F i_{oq} - \omega_{b} C_{f} v_{od} + K_{pv} (v_{oq}^* - v_{oq}) + K_{iv} \phi_{q}$
57+
+ $\frac{d\gamma_{d}}{dt} = i_{ld}^* - i_{ld}$
58+
+ $\frac{d\gamma_{q}}{dt} = i_{lq}^* - i_{lq}$
59+
+ $v_{id}^* = -\omega_{b} L_{f} i_{lq} + K_{pc} ( i_{ld}^* - i_{ld}) + K_{ic} \gamma_{d}$
60+
+ $v_{iq}^* = -\omega_{b} L_{f} i_{ld} + K_{pc} ( i_{lq}^* - i_{lq}) + K_{ic} \gamma_{q}$
61+
+ $\frac{di_{ld}}{dt} = -(\frac{r_{Lf}}{L_{f}}) i_{ld} + \omega_{com} i_{lq} + \frac{v_{id}^* - v_{id}}{L_f}$
62+
+ $\frac{di_{lq}}{dt} = -(\frac{r_{Lf}}{L_{f}}) i_{lq} + \omega_{com} i_{ld} + \frac{v_{iq}^* - v_{iq}}{L_f}$
63+
+ $\frac{dv_{od}}{dt} = \omega_{com} v_{oq} + \frac{i_{ld} - i_{od}}{C_f}$
64+
+ $\frac{dv_{oq}}{dt} = -\omega_{com} v_{od} + \frac{i_{lq} - i_{oq}}{C_f}$
65+
+ $V_{bd,in} = \cos(\delta) V_{a} - \sin(\delta) V_{b}$
66+
+ $V_{bq,in} = -\sin(\delta) V_{a} + \cos(\delta) V_{b}$
67+
+ $\frac{di_{od}}{dt} = -(\frac{r_{Lc}}{L_{c}}) i_{od} + \omega_{com} i_{oq} + \frac{v_{od} - V_{bd,in}}{L_f}$
68+
+ $\frac{di_{oq}}{dt} = -(\frac{r_{Lc}}{L_{c}}) i_{oq} + \omega_{com} i_{ld} + \frac{v_{oq} - V_{bq,in}}{L_f}$
69+
70+
Note all internal direct equalities are simplified into the differential equations.
71+
72+
73+
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.
74+
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.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
The Bus used for the Microgrid found in references 1 and 2.
3+
4+
Parameters:
5+
+ $RN$ - Virtual Resistance
6+
7+
Variables (External):
8+
+ $v_{D}$ - Incoming Bus Voltage (D)
9+
+ $v_{Q}$ - Incoming Bus Voltage (Q)
10+
11+
Equations (External, Residuals):
12+
+ $\frac{-v_D}{RN}$
13+
+ $\frac{-v_Q}{RN}$
14+
15+
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.
16+
17+
18+
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.
19+
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.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
The Line used for the Microgrid found in references 1 and 2.
3+
4+
Parameters:
5+
+ $R$ - Resistance
6+
+ $L$ - Inductance
7+
8+
Variables (External):
9+
+ $\omega_{ref}$ - Reference Rotor Angle
10+
+ $v_{D1}$ - Incoming Bus 1 Voltage (D)
11+
+ $v_{Q1}$ - Incoming Bus 1 Voltage (Q)
12+
+ $v_{D2}$ - Incoming Bus 2 Voltage (D)
13+
+ $v_{Q2}$ - Incoming Bus 2 Voltage (Q)
14+
+ $i_{D}$ - Line Current (D)
15+
+ $i_{Q}$ - Line Current (Q)
16+
17+
Equations (External, Residuals):
18+
+ $0$    (Reference Rotor Residual)
19+
+ $-i_{D}$    (Bus 1 Residuals)
20+
+ $-i_{Q}$
21+
+ $i_{D}$    (Bus 2 Residuals)
22+
+ $i_{Q}$
23+
24+
Equations (Internal):
25+
+ $\frac{di_{D}}{dt} = -(\frac{R}{L}) i_{D} + \omega_{ref} i_{Q} + \frac{v_{D1} - v_{D2}}{L}$
26+
+ $\frac{di_{Q}}{dt} = -(\frac{R}{L}) i_{Q} + \omega_{ref} i_{D} + \frac{v_{Q1} - v_{Q2}}{L}$
27+
28+
29+
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.
30+
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.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
The Load used for the Microgrid found in references 1 and 2.
3+
4+
Parameters:
5+
+ $R$ - Resistance
6+
+ $L$ - Inductance
7+
8+
Variables (External):
9+
+ $\omega_{ref}$ - Reference Rotor Angle
10+
+ $v_{D}$ - Incoming Bus Voltage (D)
11+
+ $v_{Q}$ - Incoming Bus Voltage (Q)
12+
+ $i_{D}$ - Line Current (D)
13+
+ $i_{Q}$ - Line Current (Q)
14+
15+
Equations (External, Residuals):
16+
+ $0$    (Reference Rotor Residual)
17+
+ $-i_{D}$    (Bus Residuals)
18+
+ $-i_{Q}$
19+
20+
Equations (Internal):
21+
+ $\frac{di_{D}}{dt} = -(\frac{R}{L}) i_{D} + \omega_{ref} i_{Q} + \frac{v_{D1} - v_{D2}}{L}$
22+
+ $\frac{di_{Q}}{dt} = -(\frac{R}{L}) i_{Q} + \omega_{ref} i_{D} + \frac{v_{Q1} - v_{Q2}}{L}$
23+
24+
25+
26+
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.
27+
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.

src/Model/PowerElectronics/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
This sub-directory provides components utilized within the PowerElectronicsModel composer. All components are treated equally and only the composer can view and distribute data to components. Components have no knowledge nor require the existence of any other component.
2+
Each component evaluates a set of equations to form residuals. There are two types of variables.
3+
+ Internal Variables. Variables only need by the component.
4+
+ External Variables. Variables shared between multiple components.
5+
6+
Each equation is associated to a variable. The residuals generated by external components are assumed to add together to form the final system.
7+
Arbitrary amounts of components can be handle and residuals evaluated.
8+
9+
The composer can handle arbitrary components with arbitrary connections.
10+
Connections are handled via integer mapping between components and the composer via `getNodeConnections` and `setNodeConnections`.
11+
12+
The composer suppose Jacobian constructions as well.
13+
14+
Example with two components is as follows.
15+
16+
Component 1:
17+
```math
18+
\begin{align}
19+
0 = f_1(\frac{dy_{1}}{dt}, y_1 ,z) & \qquad \text{(Internal Equations)}\\
20+
c_1(y_1,z) & \qquad \text{(External Residuals)}\\
21+
\end{align}
22+
```
23+
Component 2:
24+
```math
25+
\begin{align}
26+
0 = f_2(\frac{dy_{2}}{dt}, y_2 ,z) & \qquad \text{(Internal Equations)}\\
27+
c_2(y_2,z) & \qquad \text{(External Residuals)}\\
28+
\end{align}
29+
```
30+
31+
The composition of components 1 and 2:
32+
```math
33+
\begin{align}
34+
0 = f_1(\frac{dy_{1}}{dt}, y_1 ,z) & \qquad \text{(Internal Equations)}\\
35+
0 = f_2(\frac{dy_{2}}{dt}, y_2 ,z) &\\
36+
0 = c_1(y_1, z) + c_2(y_2,z) & \qquad \text{(Composed External Residuals)}\\
37+
\end{align}
38+
```
39+
40+
Note the dimensions of \(y\) can be \(0\) if there are no internal equations (an example seen in Resistors and MicrogridBus).

0 commit comments

Comments
 (0)