Skip to content

Commit

Permalink
Merge pull request #57 from NREL-Sienna/jd/add_psid_example_data
Browse files Browse the repository at this point in the history
Jd/add psid example data
  • Loading branch information
jd-lara committed Jun 26, 2023
2 parents a5e75a3 + 0f68c77 commit bb84a0a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[CaseData]
git-tree-sha1 = "8ca703c3979927752c9ff77a32bd85f3c97d93b9"
git-tree-sha1 = "2fc84c9858b0cada3d37ffe198a4dd11ed54601d"

[[CaseData.download]]
url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/1.0.1.tar.gz"
sha256 = "15d0e7a8c7e40e62ae2a77a4691fc83a2c6a60dc79774411bcf0bfb6ecea5a57"
url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/1.0.2.tar.gz"
sha256 = "e58a881dc784be1c7edf6ebd57b7276232aab9b8e46bfb9f10365f902c8ede3d"

[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,5 +1,5 @@
const PACKAGE_DIR = joinpath(dirname(dirname(pathof(PowerSystemCaseBuilder))))
const DATA_DIR = joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-1.0.1")
const DATA_DIR = joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-1.0.2")
const RTS_DIR = joinpath(LazyArtifacts.artifact"rts", "RTS-GMLC-0.2.2")

const SYSTEM_DESCRIPTORS_FILE = joinpath(PACKAGE_DIR, "src", "system_descriptor.jl")
Expand Down
28 changes: 26 additions & 2 deletions src/library/psid_library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ function build_psid_4bus_multigen(; kwargs...)
dyr_file = joinpath(data_dir, "FourBus_multigen.dyr")

sys = System(raw_file, dyr_file; sys_kwargs...)
for l in get_components(PSY.PowerLoad, sys)
PSY.set_model!(l, PSY.LoadModels.ConstantImpedance)
for l in get_components(PSY.StandardLoad, sys)
transform_load_to_constant_impedance(l)
end
return sys
end
Expand All @@ -18,5 +18,29 @@ function build_psid_11bus_andes(; kwargs...)
raw_file = joinpath(data_dir, "11BUS_KUNDUR.raw")
dyr_file = joinpath(data_dir, "11BUS_KUNDUR_TGOV.dyr")
sys = System(raw_file, dyr_file; sys_kwargs...)
for l in get_components(PSY.StandardLoad, sys)
transform_load_to_constant_impedance(l)
end
return sys
end

function build_psid_omib(; kwargs...)
sys_kwargs = filter_kwargs(; kwargs...)
sys_file = joinpath(DATA_DIR, "psid_tests", "data_examples", "omib_sys.json")
sys = System(sys_file; sys_kwargs...)
return sys
end

function build_psid_3bus(; kwargs...)
sys_kwargs = filter_kwargs(; kwargs...)
sys_file = joinpath(DATA_DIR, "psid_tests", "data_examples", "threebus_sys.json")
sys = System(sys_file; sys_kwargs...)
return sys
end

function build_wecc_240_dynamic(; kwargs...)
sys_kwargs = filter_kwargs(; kwargs...)
sys_file = joinpath(DATA_DIR, "psid_tests", "data_tests", "WECC_240_dynamic.json")
sys = System(sys_file; sys_kwargs...)
return sys
end
4 changes: 2 additions & 2 deletions src/library/psidtest_library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ function build_psid_test_threebus_genrou_avr(; kwargs...)
)
end

for l in get_components(PSY.StandardLoad, threebus_sys)
for l in get_components(PSY.StandardLoad, sys)
transform_load_to_constant_impedance(l)
end

Expand Down Expand Up @@ -788,7 +788,7 @@ function build_psid_test_threebus_multimachine_dynlines(; kwargs...)
add_component!(sys, dyn_line)
end

for l in get_components(PSY.StandardLoad, threebus_sys)
for l in get_components(PSY.StandardLoad, sys)
transform_load_to_constant_impedance(l)
end

Expand Down
20 changes: 19 additions & 1 deletion src/system_descriptor_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1105,9 +1105,27 @@ const SYSTEM_CATALOG = [
),
SystemDescriptor(;
name = "2Area 5 Bus System",
description = "PSI test system with two areas connected with an HVDC Line", # Old Test 38
description = "PSI test system with two areas connected with an HVDC Line",
category = PSISystems,
raw_data = joinpath(DATA_DIR, "psy_data", "data_5bus_pu.jl"),
build_function = build_two_zone_5_bus,
),
SystemDescriptor(;
name = "OMIB System",
description = "OMIB case with 2 state machine for examples",
category = PSIDSystems,
build_function = build_psid_omib,
),
SystemDescriptor(;
name = "Three Bus Dynamic data Example System",
description = "Three Bus case for examples",
category = PSIDSystems,
build_function = build_psid_3bus,
),
SystemDescriptor(;
name = "WECC 240 Bus",
description = "WECC 240 Bus case dynamic data with some modifications",
category = PSIDSystems,
build_function = build_psid_3bus,
),
]

0 comments on commit bb84a0a

Please sign in to comment.