Skip to content

Commit

Permalink
Merge pull request #103 from NREL-Sienna/rh/add_oriol_rts
Browse files Browse the repository at this point in the history
add MTHVDC system
  • Loading branch information
jd-lara authored Jul 16, 2024
2 parents 1f3a205 + d460a08 commit ca83ed4
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[CaseData]
git-tree-sha1 = "906591a156d0f786940f105e4f6aeceffefa7a2e"
git-tree-sha1 = "afb608473cf4d5eb22147856de1a1a651f36d40b"
lazy = true

[[CaseData.download]]
url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/3.0.tar.gz"
sha256 = "6e8b16c62c8859d39a0d8eae65a20f8aa3da9a70b7e36d3dce690dcad1775437"
url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/3.1.tar.gz"
sha256 = "4ac6ccd9dc9690b52ad6d0f46eeb759608e04ef8bc871732ff54bdbb0493dcea"

[rts]
git-tree-sha1 = "5098f357bad765bfefcff58f080818863ca776bd"
Expand Down
2 changes: 1 addition & 1 deletion src/definitions.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const PACKAGE_DIR = joinpath(dirname(dirname(pathof(PowerSystemCaseBuilder))))
const DATA_DIR =
joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-3.0")
joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-3.1")

const RTS_DIR = joinpath(LazyArtifacts.artifact"rts", "RTS-GMLC-0.2.2")

Expand Down
72 changes: 72 additions & 0 deletions src/library/psi_library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1545,3 +1545,75 @@ function build_HVDC_TWO_RTO_RTS_5Min_sys(; kwargs...)
new_sys = _duplicate_system(main_sys_RT, deepcopy(main_sys_RT), true)
return new_sys
end

function build_MTHVDC_two_RTS_DA_sys_noForecast(; kwargs...)
sys_rts = build_RTS_GMLC_DA_sys_noForecast(; kwargs...)
sys = _duplicate_system(sys_rts, deepcopy(sys_rts), false)
include(joinpath(
DATA_DIR,
"psy_data",
"data_mthvdc_twin_rts.jl",
))
# Remove AC connection
ac_interconnection = first(PSY.get_components(PSY.MonitoredLine, sys))
PSY.remove_component!(sys, ac_interconnection)

### Add DC Buses ###
for dcbus in dcbuses
PSY.add_component!(sys, dcbus)
end

### Add DC Lines ###
for dcline in dclines
PSY.add_component!(sys, dcline)
end

### Add IPCs ###
function get_bus_by_number(sys, number)
return first(get_components(x -> x.number == number, Bus, sys))
end

for (ix, bus_tuple) in enumerate(bus_arcs_7T)
dcbus = get_bus_by_number(sys, bus_tuple[1])
acbus = get_bus_by_number(sys, bus_tuple[2])
ipc = PSY.InterconnectingConverter(;
name = "$(bus_tuple[2])_$(bus_tuple[1])",
available = true,
bus = acbus,
dc_bus = dcbus,
active_power = 0.0,
rating = 1.0,
active_power_limits = (min = 0.0, max = 1.0),
base_power = P_limit_7T[ix],
loss_function = PSY.QuadraticCurve(
c_pu[ix],
b_pu[ix],
a_pu[ix],
),
)
PSY.add_component!(sys, ipc)
end

for bus_tuple in bus_arcs_9T
dcbus = get_bus_by_number(sys, bus_tuple[1])
acbus = get_bus_by_number(sys, bus_tuple[2])
ipc = PSY.InterconnectingConverter(;
name = "$(bus_tuple[2])_$(bus_tuple[1])",
available = true,
bus = acbus,
dc_bus = dcbus,
active_power = 0.0,
rating = 1.0,
active_power_limits = (min = 0.0, max = 1.0),
base_power = P_limit_9T,
loss_function = PSY.QuadraticCurve(
c_pu_9T,
b_pu_9T,
a_pu_9T,
),
)
PSY.add_component!(sys, ipc)
end

return sys
end
7 changes: 7 additions & 0 deletions src/system_descriptor_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,13 @@ const SYSTEM_CATALOG = [
raw_data = RTS_DIR,
build_function = build_HVDC_TWO_RTO_RTS_5Min_sys,
),
SystemDescriptor(;
name = "MTHVDC_two_RTS_DA_sys_noForecast",
description = "Two RTS systems connected by two multi-terminal HVDC systems",
category = PSISystems,
raw_data = RTS_DIR,
build_function = build_MTHVDC_two_RTS_DA_sys_noForecast,
),
SystemDescriptor(;
name = "psse_ACTIVSg2000_sys",
description = "PSSE ACTIVSg2000 Test system",
Expand Down

0 comments on commit ca83ed4

Please sign in to comment.