-
Notifications
You must be signed in to change notification settings - Fork 100
Jb/documentation updates #1635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Jb/documentation updates #1635
Changes from 11 commits
bcba6ba
828910d
db59c76
6ee4e64
5ae3d74
2e3b27b
cede0fb
386116e
0d81648
f921449
0224c49
499baef
d116d78
ce0fc4d
a65d888
73d451d
9e049ca
d8e579f
08f79af
3d3f9a6
4449319
ecd69fa
6844b0f
4d13017
a344bbe
08c2d07
35e8fbd
b228162
ded0513
d907136
6c2ab2c
cfde49c
ade8efe
0dcd08b
907f72a
286452b
62cae42
6e722c0
a209d03
df51ede
60876fd
0fad077
5b521ae
31b8e66
8e3a718
6bf5838
2ae0447
e9ce9db
be6a930
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -92,7 +92,7 @@ EIA Annual Energy Review. `ThermalFuels` has the options: | |||||
| | `BLACK_LIQUOR` | BLQ | Black Liquor | | ||||||
| | `WOOD_WASTE_LIQUIDS` | WDL | Wood Waste Liquids excluding Black Liquor (includes red liquor, sludge wood, spent sulfite liquor, and other wood-based liquids) | | ||||||
| | `LANDFILL_GAS` | LFG | Landfill Gas | | ||||||
| | `OTHEHR_BIOMASS_GAS` | OBG | Other Biomass Gas (includes digester gas, methane, and other biomass gasses) | | ||||||
| | `OTHER_BIOMASS_GAS` | OBG | Other Biomass Gas (includes digester gas, methane, and other biomass gasses) | | ||||||
|
||||||
| | `OTHER_BIOMASS_GAS` | OBG | Other Biomass Gas (includes digester gas, methane, and other biomass gasses) | | |
| | `OTHEHR_BIOMASS_GAS` | OBG | Other Biomass Gas (includes digester gas, methane, and other biomass gasses) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update src/definitions.jl and any other uses and note the breaking change in PR comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,98 @@ | ||
| # [Understanding ACBusTypes](@id bustypes) | ||
|
|
||
| `PowerSystems.jl` supports multiple types of AC buses, [listed here](@ref acbustypes_list). | ||
| When creating nodal datasets, the definitions for AC Buses can have a significant impact on the | ||
| topology logic for the network. | ||
| In AC power flow analysis, every bus in the network has four associated quantities: real | ||
| power injection ($P$), reactive power injection ($Q$), voltage magnitude ($|V|$), and | ||
| voltage angle ($\delta$). The power flow problem is solvable only when exactly two of | ||
| these four quantities are specified at each bus — the other two are determined by the | ||
| solver. The `ACBusType` of a bus declares which two quantities are known, and therefore | ||
| shapes how the power flow problem is formulated across the whole network. | ||
|
|
||
| ## Voltage Control Types | ||
| `PowerSystems.jl` supports five `ACBusType`s, [listed here](@ref acbustypes_list). The | ||
| choice of bus type for each bus in a dataset has a direct effect on solver behavior, | ||
| convergence, and the interpretation of results. | ||
|
|
||
| ## [Voltage Control Types](https://en.wikipedia.org/wiki/Voltage_control_and_reactive_power_management) | ||
|
|
||
| Most buses in a network fall into one of two voltage control categories, depending on | ||
| whether the equipment connected can actively regulate its terminal voltage. | ||
|
|
||
| - `PQ`: | ||
|
|
||
| + **Known:** Real Power Injection ($P$) and Reactive Power Injection ($Q$). These are typically the loads at that bus or fixed power factor generators. | ||
| + **Unknown:** Voltage Magnitude ($|V|$) and Voltage Angle ($\delta$). | ||
| + Represents a bus where the voltage magnitude and angle are free to vary based on the system conditions. | ||
| + **Known:** Real power injection ($P$) and reactive power injection ($Q$). These | ||
| are typically fixed loads or generators operating at a fixed power factor. | ||
| + **Unknown:** Voltage magnitude ($|V|$) and voltage angle ($\delta$), which are | ||
| determined by the power flow solution. | ||
| + This is the most common bus type. Because $|V|$ is unconstrained, the voltage at | ||
| a `PQ` bus reflects the state of the surrounding network rather than any local | ||
| control action. | ||
|
|
||
| - `PV`: | ||
|
|
||
| + **Known:** Real Power Injection ($P$) and Voltage Magnitude ($|V|$). | ||
| + **Unknown:** Reactive Power Injection ($Q$) and Voltage Angle ($\delta$). | ||
| + Typically represents a bus with an injector connected, where the injector controls the reactive power output and regulates the bus voltage magnitude to a setpoint. | ||
| + **Known:** Real power injection ($P$) and voltage magnitude ($|V|$). | ||
| + **Unknown:** Reactive power injection ($Q$) and voltage angle ($\delta$). | ||
| + Represents a bus with a generator or other device actively regulating its | ||
| terminal voltage to a setpoint. The reactive power output floats to whatever | ||
| value is needed to hold that voltage. This is the typical representation of a | ||
| synchronous generator with an automatic voltage regulator (AVR). | ||
|
|
||
| The distinction matters because placing a generator on a `PV` bus rather than a `PQ` bus | ||
| allows the power flow solver to use the voltage setpoint as a constraint, which is closer | ||
| to how real generators operate and tends to produce more physically meaningful results. | ||
|
|
||
| ## Reference and Slack Buses | ||
|
|
||
| There is a nuanced distinction between a slack bus and a reference bus. In most small test sytems and academic discussions, the system has a single slack bus which is also the reference bus. However, for large interconnected cases or cases with a very radial structure, having a single bus that takes on all the real power mistmatch in the system can lead to erroneous results. In PowerSystems.jl we distinguish the posibility of having slacks and reference buses. Is up to the modeler to decide how to handle the classifications inside of the applications. In other words, wether a reference bus is also a slack or viceversa is left to the application developer. | ||
| Every power flow problem also requires buses that handle system-wide power balance and | ||
| provide an angular reference. `PowerSystems.jl` distinguishes between these two roles, | ||
| because conflating them — as many textbooks and smaller test systems do — can produce | ||
| misleading results in large or radially structured networks. | ||
|
|
||
| - `SLACK`: | ||
|
|
||
| + Known: Voltage Magnitude ($|V|$) and Voltage Angle ($\delta$) **when the slack and the reference are the same bus, otherwise is unknown**. | ||
| + Unknown: Real Power ($P$) and Reactive Power ($Q$). These values are calculated as residuals after the power flow solution converges to account for system losses and imbalances and are allocated using participation factors in the model formulation. | ||
| + This kind of bus absorbs or supplies the difference between the total generation and total load plus losses in the system. There can be several slack buses in a system. | ||
|
|
||
| - Ref: | ||
|
|
||
| + Known: Voltage Magnitude ($|V|$) and Voltage Angle ($\delta$). Typically, the angle is set to 0 degrees for simplicity, and the voltage is set to a fixed value per unit.0 degrees for simplicity and the voltage is set to a fixed value per unit. | ||
| + Unknown: Real Power ($P$) and Reactive Power ($Q$). These values are calculated as residuals after the power flow solution converges to account for system losses and imbalances when there is a single slack bus that matches the reference bus. | ||
| + Serves as the "reference" for all other bus voltage angles in the AC interconnected system. | ||
|
|
||
| For the study of large interconnected areas that include different asynchronous AC networks connected through HVDC, the system can contain multiple reference buses. Since not all modeling efforts require a properly set reference bus, e.g., Zonal Modeling, **PowerSystems.jl does not perform a verification that the system buses are adequately set. This feature is implemented in [`PowerNetworkMatrices.jl`](https://nrel-sienna.github.io/PowerNetworkMatrices.jl/stable/).** | ||
| + **Known:** Voltage magnitude ($|V|$) and voltage angle ($\delta$) *only when the | ||
| slack and the reference coincide*; otherwise both are unknown. | ||
| + **Unknown:** Real power ($P$) and reactive power ($Q$), which are calculated as | ||
| residuals after the power flow solution converges. Losses and generation-load | ||
| imbalances are distributed across slack buses using participation factors. | ||
| + A system can have multiple slack buses. In large interconnected cases, distributing | ||
| the power mismatch across several buses is more physically realistic than | ||
| concentrating it at one. | ||
|
|
||
| - `REF`: | ||
|
|
||
| + **Known:** Voltage magnitude ($|V|$) and voltage angle ($\delta$). By convention | ||
| the angle is set to 0 radians and the voltage to a fixed per-unit value, providing | ||
| the angular reference against which all other bus angles are measured. | ||
| + **Unknown:** Real power ($P$) and reactive power ($Q$) when the reference bus is | ||
| also the sole slack bus. | ||
| + In systems that span multiple asynchronous AC networks connected through HVDC, | ||
| each island needs its own reference bus. | ||
|
|
||
| `PowerSystems.jl` treats `SLACK` and `REF` as distinct designations, leaving it to the | ||
| application developer to decide whether a reference bus should also absorb power mismatch. | ||
| Because not all modeling workflows require a properly configured reference bus — zonal | ||
| production cost models, for example, do not — **`PowerSystems.jl` does not verify that | ||
| the system buses are adequately set. That validation is implemented in | ||
| [`PowerNetworkMatrices.jl`](https://nrel-sienna.github.io/PowerNetworkMatrices.jl/stable/).** | ||
|
|
||
| For worked examples of constructing reference and slack buses and adding them to a system, | ||
| see the [Create and Explore a Power System](@ref tutorial_creating_system) tutorial. | ||
|
|
||
| ## Isolated Buses and the `available` field | ||
|
|
||
| In certain modeling applications, particularly power flow modeling tools, the designation of | ||
| "isolated" is used to signal that the bus is temporarily disconnected from the network, as are any other components attached to it. However, in `PowerSystems.jl`, a bus and its components can be excluded from an analysis or optimization without changing the underlying network topology by setting the `available` field to false: `set_available!(bus, false)`. | ||
|
|
||
| In PowerSystems.jl the `ISOLATED` type means exactly that: The bus is not connected to the network. In | ||
| resource analysis where systems contain isolated subsystems that can be ignored for the purposes of the power flow but are relevant when performing optimization, the `ISOLATED` designation provides the capability to describe those situations in precise terms. `ISOLATED` buses can also be made unavailable to make the components attached to them also unavailable. | ||
| Many power flow tools use an "isolated" designation to signal that a bus is temporarily | ||
| disconnected from the network. `PowerSystems.jl` keeps this concept but separates it from | ||
| the question of whether a component participates in a given analysis. | ||
|
|
||
| In `PowerSystems.jl`, `ISOLATED` means precisely that the bus is structurally | ||
| disconnected from the network — it has no active connections. This is distinct from | ||
| *excluding* a bus from a particular analysis, which is handled by setting the `available` | ||
| field to `false` via `set_available!(bus, false)`. Setting `available = false` removes the | ||
| bus and its attached components from consideration without altering the underlying network | ||
| topology, which is important when the same dataset is used across multiple modeling | ||
| contexts. | ||
|
|
||
| This design supports resource analysis workflows where isolated subsystems exist in the | ||
| data — perhaps representing planned expansions or decommissioned equipment — and must be | ||
| represented precisely while being excluded from active power flow or optimization runs. | ||
| `ISOLATED` buses can additionally be made unavailable, which propagates the exclusion to | ||
| all components attached to them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the new file back to supplemental_attributes.md