Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcosovic committed Aug 14, 2024
1 parent fe098b3 commit 21318de
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions docs/src/tutorials/acOptimalPowerFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ The AC optimal power flow problem can be formulated as follows:
& & & h_{Q_i}(\mathbf {Q}_{\text{g}}, \mathbf {V}, \bm{\Theta}) = 0,\;\;\; \forall i \in \mathcal{N} \\[5pt]
& & & V_{i}^\text{min} \leq V_i \leq V_{i}^\text{max},\;\;\; \forall i \in \mathcal{N} \\
& & & \theta_{ij}^\text{min} \leq \theta_i - \theta_j \leq \theta_{ij}^\text{max},\;\;\; \forall (i,j) \in \mathcal{E} \\[5pt]
& & & h_{ij}(\mathbf {V}, \bm{\Theta}) \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E} \\
& & & h_{ji}(\mathbf {V}, \bm{\Theta}) \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E} \\[5pt]
& & & |h_{ij}(\mathbf {V}, \bm{\Theta})| \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E} \\
& & & |h_{ji}(\mathbf {V}, \bm{\Theta})| \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E} \\[5pt]
& & & P_{\text{g}i}^\text{min} \leq P_{\text{g}i} \leq P_{\text{g}i}^\text{max} ,\;\;\; \forall i \in \mathcal{S} \\
& & & Q_{\text{g}i}^\text{min} \leq Q_{\text{g}i} \leq Q_{\text{g}i}^\text{max} ,\;\;\; \forall i \in \mathcal{S}.
\end{aligned}
Expand Down Expand Up @@ -285,16 +285,16 @@ The inequality constraints related to the branch flow ratings can be associated
Specifically, `type = 1` is used for apparent power flow, `type = 2` for active power flow, and `type = 3` for current magnitude. These constraints can be expressed using the equations ``h_{ij}(\mathbf {V}, \bm{\Theta})`` and ``h_{ji}(\mathbf {V}, \bm{\Theta})``, representing the rating constraints at the from-bus and to-bus ends of each branch, respectively:
```math
\begin{aligned}
h_{ij}(\mathbf {V}, \bm{\Theta}) \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E} \\
h_{ji}(\mathbf {V}, \bm{\Theta}) \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E}.
|h_{ij}(\mathbf {V}, \bm{\Theta})| \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E} \\
|h_{ji}(\mathbf {V}, \bm{\Theta})| \leq F_{ij}^{\text{max}},\;\;\; \forall (i,j) \in \mathcal{E}.
\end{aligned}
```
These rating constraints ensure that the power flow or current in each branch does not exceed the specified limits, helping to maintain the security and reliability of the power system. The upper bounds are determined based on the vector ``\mathbf{F}_{\text{max}} = [F_{ij}^\text{max}]``, ``(i,j) \in \mathcal{E}``. These bounds can be accessed using the following variable:
```@repl ACOptimalPowerFlow
𝐅ₘₐₓ = system.branch.flow.longTerm
```

By default, JuliaGrid employs the rating constraints linked with the apparent power flow (type = 1). This constraint at the from-bus is specified as:
By default, JuliaGrid employs the rating constraints linked with the apparent power flow (`type = 1`). This constraint at the from-bus is specified as:
```math
h_{ij}(\mathbf {V}, \bm{\Theta}) = \sqrt{ A_{ij} V_i^4 + B_{ij} V_i^2 V_j^2 - 2 [C_{ij} \cos(\theta_{ij} - \phi_{ij}) - D_{ij} \sin(\theta_{ij} - \phi_{ij})]V_i^3 V_j},
```
Expand All @@ -318,14 +318,6 @@ where:
\end{gathered}
```

Since the quantity under the square root is always positive, these constraints are implemented by squaring them for computational efficiency. Thus, the squared rating constraints for the apparent power flow at the from-bus and to-bus ends of each branch can be expressed as follows:
```math
\begin{aligned}
h_{ij}(\mathbf {V}, \bm{\Theta})^2 \leq (F_{ij}^{\text{max}})^2, \;\;\; \forall (i,j) \in \mathcal{E} \\
h_{ji}(\mathbf {V}, \bm{\Theta})^2 \leq (F_{ij}^{\text{max}})^2, \;\;\; \forall (i,j) \in \mathcal{E}.
\end{aligned}
```

---

The second option is to define the `longTerm` keyword for the active power flow constraints (`type = 2`) at the from-bus and to-bus ends of each branch:
Expand Down Expand Up @@ -358,13 +350,6 @@ The last option involves defining the `longTerm` keyword for the current magnitu
h_{ji}(\mathbf {V}, \bm{\Theta}) &= \sqrt{A_{ji}V_j^2 + B_{ji}V_i^2 - 2[C_{ji} \cos(\theta_{ij} - \phi_{ij}) + D_{ji}\sin(\theta_{ij} - \phi_{ij})]V_iV_j}.
\end{aligned}
```
These coefficients remain the same as those specified for apparent powers. Similarly, for apparent power, these constraints are reformulated as squared inequalities:
```math
\begin{aligned}
h_{ij}(\mathbf {V}, \bm{\Theta})^2 \leq (F_{ij}^{\text{max}})^2, \;\;\; \forall (i,j) \in \mathcal{E} \\
h_{ji}(\mathbf {V}, \bm{\Theta})^2 \leq (F_{ij}^{\text{max}})^2, \;\;\; \forall (i,j) \in \mathcal{E}.
\end{aligned}
```

---

Expand Down

0 comments on commit 21318de

Please sign in to comment.