{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Parsing PSS/e `*.RAW` Files"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"**Originally Contributed by**: Clayton Barrows"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"## Introduction"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"An example of how to parse PSS/e files and create a `System` using [PowerSystems.jl](github.com/NREL-SIIP/PowerSystems.jl)"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"### Dependencies"
],
"metadata": {}
},
{
"outputs": [],
"cell_type": "code",
"source": [
"using PowerSystems\n",
"using TimeSeries"
],
"metadata": {},
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### Fetch Data\n",
"PowerSystems.jl links to some test data that is suitable for this example.\n",
"Let's download the test data"
],
"metadata": {}
},
{
"outputs": [],
"cell_type": "code",
"source": [
"PowerSystems.download(PowerSystems.TestData; branch = \"master\")\n",
"base_dir = dirname(dirname(pathof(PowerSystems)));"
],
"metadata": {},
"execution_count": 2
},
{
"cell_type": "markdown",
"source": [
"### Create a `System`"
],
"metadata": {}
},
{
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ Info: The PSS(R)E parser currently supports buses, loads, shunts, generators, branches, transformers, and dc lines\n",
"[ Info: The PSS(R)E parser currently supports buses, loads, shunts, generators, branches, transformers, and dc lines\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: The following fields in LOAD are missing: INTRPT\n",
"[ Info: Switched shunt converted to fixed shunt, with default value gs=0.0\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 32 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 29 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 1 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 54 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 78 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 81 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 101 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 2 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 105 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 109 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 74 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 41 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 65 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 51 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 53 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 106 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 119 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 27 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 75 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 42 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 33 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 28 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 50 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 52 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 111 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 63 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 115 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 92 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 88 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 93 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 26 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 10 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 120 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 77 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 24 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 87 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 117 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 58 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 25 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 114 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 23 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 49 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 59 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 5 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 31 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 89 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 62 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 43 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 90 to +/- 60.0 deg.\n",
"[ Info: angmin and angmax values are 0, widening these values on branch 39 to +/- 60.0 deg.\n",
"[ Info: no active generators found at bus 309, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 320, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 119, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 303, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 310, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 104, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 308, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 319, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 212, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 312, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 317, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 324, updating to bus type from 2 to 1\n",
"[ Info: no active generators found at bus 103, updating to bus type from 2 to 1\n",
"[ Info: the voltage setpoint on generator 32 does not match the value at bus 118\n",
"[ Info: the voltage setpoint on generator 29 does not match the value at bus 118\n",
"[ Info: the voltage setpoint on generator 1 does not match the value at bus 101\n",
"[ Info: the voltage setpoint on generator 54 does not match the value at bus 201\n",
"[ Info: the voltage setpoint on generator 78 does not match the value at bus 221\n",
"[ Info: the voltage setpoint on generator 81 does not match the value at bus 222\n",
"[ Info: the voltage setpoint on generator 101 does not match the value at bus 307\n",
"[ Info: the voltage setpoint on generator 2 does not match the value at bus 101\n",
"[ Info: the voltage setpoint on generator 105 does not match the value at bus 310\n",
"[ Info: the voltage setpoint on generator 109 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 74 does not match the value at bus 215\n",
"[ Info: the voltage setpoint on generator 41 does not match the value at bus 121\n",
"[ Info: the voltage setpoint on generator 132 does not match the value at bus 315\n",
"[ Info: the voltage setpoint on generator 153 does not match the value at bus 322\n",
"[ Info: the voltage setpoint on generator 65 does not match the value at bus 213\n",
"[ Info: the voltage setpoint on generator 155 does not match the value at bus 322\n",
"[ Info: the voltage setpoint on generator 51 does not match the value at bus 123\n",
"[ Info: the voltage setpoint on generator 53 does not match the value at bus 123\n",
"[ Info: the voltage setpoint on generator 106 does not match the value at bus 312\n",
"[ Info: the voltage setpoint on generator 119 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 27 does not match the value at bus 115\n",
"[ Info: the voltage setpoint on generator 75 does not match the value at bus 215\n",
"[ Info: the voltage setpoint on generator 42 does not match the value at bus 122\n",
"[ Info: the voltage setpoint on generator 33 does not match the value at bus 118\n",
"[ Info: the voltage setpoint on generator 28 does not match the value at bus 116\n",
"[ Info: the voltage setpoint on generator 50 does not match the value at bus 123\n",
"[ Info: the voltage setpoint on generator 52 does not match the value at bus 123\n",
"[ Info: the voltage setpoint on generator 159 does not match the value at bus 324\n",
"[ Info: the voltage setpoint on generator 111 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 63 does not match the value at bus 207\n",
"[ Info: the voltage setpoint on generator 121 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 115 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 141 does not match the value at bus 319\n",
"[ Info: the voltage setpoint on generator 92 does not match the value at bus 301\n",
"[ Info: the voltage setpoint on generator 88 does not match the value at bus 223\n",
"[ Info: the voltage setpoint on generator 93 does not match the value at bus 301\n",
"[ Info: the voltage setpoint on generator 26 does not match the value at bus 115\n",
"[ Info: the voltage setpoint on generator 10 does not match the value at bus 102\n",
"[ Info: the voltage setpoint on generator 120 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 77 does not match the value at bus 218\n",
"[ Info: the voltage setpoint on generator 24 does not match the value at bus 114\n",
"[ Info: the voltage setpoint on generator 87 does not match the value at bus 223\n",
"[ Info: the voltage setpoint on generator 117 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 58 does not match the value at bus 202\n",
"[ Info: the voltage setpoint on generator 25 does not match the value at bus 115\n",
"[ Info: the voltage setpoint on generator 114 does not match the value at bus 313\n",
"[ Info: the voltage setpoint on generator 23 does not match the value at bus 113\n",
"[ Info: the voltage setpoint on generator 160 does not match the value at bus 324\n",
"[ Info: the voltage setpoint on generator 154 does not match the value at bus 322\n",
"[ Info: the voltage setpoint on generator 149 does not match the value at bus 321\n",
"┌ Info: Constructing System from Power Models\n",
"│ data[\"name\"] = \"rts-gmlc\"\n",
"└ data[\"source_type\"] = \"pti\"\n",
"[ Info: Reading bus data\n",
"[ Info: Reading generator data\n",
"[ Info: Reading branch data\n",
"[ Info: Reading branch data\n",
"[ Info: Reading DC Line data\n",
"[ Info: Reading storage data\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": "System\n┌───────────────────┬─────────────┐\n│ Property │ Value │\n├───────────────────┼─────────────┤\n│ System Units Base │ SYSTEM_BASE │\n│ Base Power │ 100.0 │\n│ Base Frequency │ 60.0 │\n│ Num Components │ 539 │\n└───────────────────┴─────────────┘\n\nStatic Components\n┌─────────────────┬───────┬────────────────────────┬───────────────┐\n│ Type │ Count │ Has Static Time Series │ Has Forecasts │\n├─────────────────┼───────┼────────────────────────┼───────────────┤\n│ Arc │ 108 │ false │ false │\n│ Area │ 3 │ false │ false │\n│ Bus │ 73 │ false │ false │\n│ FixedAdmittance │ 3 │ false │ false │\n│ Line │ 105 │ false │ false │\n│ LoadZone │ 21 │ false │ false │\n│ PowerLoad │ 51 │ false │ false │\n│ TapTransformer │ 15 │ false │ false │\n│ ThermalStandard │ 160 │ false │ false │\n└─────────────────┴───────┴────────────────────────┴───────────────┘\n\n",
"text/html": [
"\n",
"\n",
"\n",
"\n",
"
\n",
"\n",
" System\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" System Units Base | \n",
" SYSTEM_BASE | \n",
"
\n",
" \n",
" Base Power | \n",
" 100.0 | \n",
"
\n",
" \n",
" Base Frequency | \n",
" 60.0 | \n",
"
\n",
" \n",
" Num Components | \n",
" 539 | \n",
"
\n",
" \n",
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" Static Components\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" Arc | \n",
" 108 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" Area | \n",
" 3 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" Bus | \n",
" 73 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" FixedAdmittance | \n",
" 3 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" Line | \n",
" 105 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" LoadZone | \n",
" 21 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" PowerLoad | \n",
" 51 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" TapTransformer | \n",
" 15 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" ThermalStandard | \n",
" 160 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
"
\n",
"\n",
"\n",
"\n"
]
},
"metadata": {},
"execution_count": 3
}
],
"cell_type": "code",
"source": [
"sys = System(joinpath(base_dir, \"data\", \"psse_raw\", \"RTS-GMLC.RAW\"));\n",
"\n",
"sys"
],
"metadata": {},
"execution_count": 3
},
{
"cell_type": "markdown",
"source": [
"---\n",
"\n",
"*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*"
],
"metadata": {}
}
],
"nbformat_minor": 3,
"metadata": {
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.7.2"
},
"kernelspec": {
"name": "julia-1.7",
"display_name": "Julia 1.7.2",
"language": "julia"
}
},
"nbformat": 4
}