PSSE 240 Bus Case system with Renewables

Originally Contributed by: José Daniel Lara

Introduction

This tutorial will introduce the industry models of Renewable Energy the comparisons between DiffEq Integration techniques for comparison. We show the uses of Sundials and OrdinaryDiffEq to obtain the transient response of a system to a perturbation.

julia> using PowerSimulationsDynamics
julia> using PowerSystemCaseBuilder
julia> using PowerSystems
julia> const PSY = PowerSystemsPowerSystems
julia> using Sundials
julia> using Plots
julia> using OrdinaryDiffEq
Note

PowerSystemCaseBuilder.jl is a helper library that makes it easier to reproduce examples in the documentation and tutorials. Normally you would pass your local files to create the system data instead of calling the function build_system. For more details visit PowerSystemCaseBuilder Documentation

Load the system and transform load data

To load the system we use PowerSystemCaseBuilder.jl:

julia> # We remove the checks in this example to avoid large prints
       sys = build_system(PSIDSystems, "WECC 240 Bus"; runchecks = false)
       
       # Transform the system's load┌ Info: Building new system WECC 240 Bus from raw data
└   sys_descriptor.raw_data = ""
┌ Warning: System is saved in the data format version 2.0.0 will be automatically upgraded to 3.0.0 upon saving
└ @ PowerSystems ~/.julia/packages/PowerSystems/xh3fM/src/data_format_conversions.jl:82
┌ Warning: The System was deserialized with checks disabled, and so was not validated.
└ @ PowerSystems ~/.julia/packages/PowerSystems/xh3fM/src/base.jl:1464
┌ Warning: System is saved in the data format version 2.0.0 will be automatically upgraded to 3.0.0 upon saving
└ @ PowerSystems ~/.julia/packages/PowerSystems/xh3fM/src/data_format_conversions.jl:110
[ Info: Serialized System to /home/runner/.julia/packages/PowerSystemCaseBuilder/vlTjU/data/serialized_system/NoArgs/WECC 240 Bus.json
[ Info: Serialized System metadata to /home/runner/.julia/packages/PowerSystemCaseBuilder/vlTjU/data/serialized_system/NoArgs/WECC 240 Bus_metadata.json
System
┌───────────────────┬─────────────┐
│ Property          │ Value       │
├───────────────────┼─────────────┤
│ Name              │             │
│ Description       │             │
│ System Units Base │ SYSTEM_BASE │
│ Base Power        │ 100.0       │
│ Base Frequency    │ 60.0        │
│ Num Components    │ 1501        │
└───────────────────┴─────────────┘

Static Components
┌─────────────────┬───────┬────────────────────────┬───────────────┐
│ Type            │ Count │ Has Static Time Series │ Has Forecasts │
├─────────────────┼───────┼────────────────────────┼───────────────┤
│ ACBus           │ 243   │ false                  │ false         │
│ Arc             │ 351   │ false                  │ false         │
│ Area            │ 4     │ false                  │ false         │
│ FixedAdmittance │ 7     │ false                  │ false         │
│ Line            │ 329   │ false                  │ false         │
│ LoadZone        │ 14    │ false                  │ false         │
│ StandardLoad    │ 139   │ false                  │ false         │
│ TapTransformer  │ 2     │ false                  │ false         │
│ ThermalStandard │ 146   │ false                  │ false         │
│ Transformer2W   │ 120   │ false                  │ false         │
└─────────────────┴───────┴────────────────────────┴───────────────┘

Dynamic Components
┌──────────────────┬───────┐
│ Type             │ Count │
├──────────────────┼───────┤
│ DynamicGenerator │ 1     │
│ DynamicGenerator │ 3     │
│ DynamicGenerator │ 41    │
│ DynamicGenerator │ 6     │
│ DynamicGenerator │ 22    │
│ DynamicGenerator │ 36    │
│ DynamicInverter  │ 37    │
└──────────────────┴───────┘
julia> for l in get_components(PSY.StandardLoad, sys) transform_load_to_constant_impedance(l) end┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81 ┌ Warning: Load data is transformed under the assumption of a 1.0 p.u. Voltage Magnitude └ @ PowerSimulationsDynamics ~/work/PowerSimulationsDynamics.jl/PowerSimulationsDynamics.jl/src/utils/psy_utils.jl:81

Build the simulation and initialize the problem

The next step is to create the simulation structure. This will create the indexing of our system that will be used to formulate the differential-algebraic system of equations. To do so, it is required to specify the perturbation that will occur in the system. In this case, we will use a ResidualModel formulation, for more details about the formulation checkout the Models Section in PowerSimulationsDynamics.jl documentation.

julia> using Logging
julia> sim_ida = Simulation( ResidualModel, sys, #system pwd(), (0.0, 20.0), #time span BranchTrip(1.0, Line, "CORONADO -1101-PALOVRDE -1401-i_10"); console_level = Logging.Info, )[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1 [ Info: Pre-Initializing Simulation States [ Info: Unit System changed to UnitSystem.SYSTEM_BASE = 0 ┌ Warning: Unit generator-3631-NB set at the limit -0.14000000000000004. Q_max = 0.20000000000000004 Q_min = -0.14000000000000004 └ @ PowerFlows ~/.julia/packages/PowerFlows/6nw6s/src/post_processing.jl:352 ┌ Warning: Unit generator-6132-G set at the limit -1.47. Q_max = 1.47 Q_min = -1.47 └ @ PowerFlows ~/.julia/packages/PowerFlows/6nw6s/src/post_processing.jl:352 ┌ Warning: Unit generator-6433-E set at the limit 0.59. Q_max = 0.59 Q_min = -0.59 └ @ PowerFlows ~/.julia/packages/PowerFlows/6nw6s/src/post_processing.jl:352 [ Info: PowerFlow solve converged, the results have been stored in the system [ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1 [ Info: Residual from initial guess: max = 9.82774084334892e-10 at 1268, total = 2.3309883363794544e-8 Iter f(x) inf-norm Step 2-norm ------ -------------- -------------- [ Info: Initialization non-linear solve succeeded with a tolerance of 1.0e-9 using solver trust_region. Saving solution. [ Info: Attaching Perturbations [ Info: Simulations status = BUILT ┌ Info: │ ─────────────────────────────────────────────────────────────────────────────── │ Time Allocations │ ─────────────── ─────────────── │ Total measured: 27.3s 4.84GiB │ │ Section ncalls time %tot alloc %tot │ ─────────────────────────────────────────────────────────────────────────────── │ Build Simulation 1 27.3s 100.0% 4.84GiB 100.0% │ Build Simulation Inputs 1 2.52s 9.2% 147MiB 3.0% │ Wrap Branches 1 11.1μs 0.0% 208B 0.0% │ Wrap Dynamic Injectors 1 1.56s 5.7% 95.4MiB 1.9% │ Calculate MM, DAE_vector, Tota... 1 214ms 0.8% 18.6MiB 0.4% │ Wrap Static Injectors 1 232ms 0.9% 5.91MiB 0.1% │ Pre-initialization 1 5.34s 19.5% 292MiB 5.9% │ Power Flow solution 1 1.14s 4.2% 44.0MiB 0.9% │ Initialize Static Injectors 1 1.31μs 0.0% 0.00B 0.0% │ Initialize Dynamic Injectors 1 4.19s 15.3% 248MiB 5.0% │ Calculate Jacobian 1 14.6s 53.4% 4.16GiB 85.9% │ Make Model Function 1 29.2μs 0.0% 32.0KiB 0.0% │ Initial Condition NLsolve refine... 1 4.41s 16.1% 249MiB 5.0% │ Build Perturbations 1 157μs 0.0% 75.1KiB 0.0% │ Make DiffEq Problem 1 463ms 1.7% 11.2MiB 0.2% │ ─────────────────────────────────────────────────────────────────────────────── └ Simulation Summary ┌─────────────────────────┬────────────────┐ │ Property │ Value │ ├─────────────────────────┼────────────────┤ │ Status │ BUILT │ │ Simulation Type │ Residual Model │ │ Initialized? │ Yes │ │ Multimachine system? │ Yes │ │ Time Span │ (0.0, 20.0) │ │ Number of States │ 2164 │ │ Number of Perturbations │ 1 │ └─────────────────────────┴────────────────┘

Run the simulation using Sundials

We will now run the simulation using Sundials.jl solver IDA() by specifying the maximum dt we want for the simulation. In our experience with this solver, solution times are faster when supplying information about the maximum time step than the tolerances as we can see in the example

julia> execute!(sim_ida, IDA(), dtmax = 0.01)SIMULATION_FINALIZED::BUILD_STATUS = 6

Read the results and plot a system variable

After the simulation is completed, we can extract the results and make plots as desired. In this case, we will plot the voltage magnitude at the bus at which the line was connected.

julia> res_ida = read_results(sim_ida)Simulation Results Summary
┌────────────────────────────┬──────────────┐
│ Property                   │ Value        │
├────────────────────────────┼──────────────┤
│ System Base Power [MVA]    │ 100.0        │
│ System Base Frequency [Hz] │ 60.0         │
│ Time Span                  │ (0.0, 20.0)  │
│ Total Time Steps           │ 2015         │
│ Number of States           │ 2164         │
│ Total solve time           │ 17.471194582 │
└────────────────────────────┴──────────────┘
julia> v1101_ida = get_voltage_magnitude_series(res_ida, 1101);
julia> plot(v1101_ida);

plot

Run the simulation using Rodas4()

In this case, we will use a MassMatrixModel formulation, for more details about the formulation checkout the Models Section in PowerSimulationsDynamics.jl documentation

julia> sim_rodas = Simulation(
           MassMatrixModel,
           sys, #system
           pwd(),
           (0.0, 20.0), #time span
           BranchTrip(1.0, Line, "CORONADO    -1101-PALOVRDE    -1401-i_10");
           console_level = Logging.Info,
       )[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Pre-Initializing Simulation States
[ Info: Unit System changed to UnitSystem.SYSTEM_BASE = 0
┌ Warning: Unit generator-3631-NB set at the limit -0.14000000000000004. Q_max = 0.20000000000000004 Q_min = -0.14000000000000004
└ @ PowerFlows ~/.julia/packages/PowerFlows/6nw6s/src/post_processing.jl:352
┌ Warning: Unit generator-6132-G set at the limit -1.47. Q_max = 1.47 Q_min = -1.47
└ @ PowerFlows ~/.julia/packages/PowerFlows/6nw6s/src/post_processing.jl:352
┌ Warning: Unit generator-6433-E set at the limit 0.59. Q_max = 0.59 Q_min = -0.59
└ @ PowerFlows ~/.julia/packages/PowerFlows/6nw6s/src/post_processing.jl:352
[ Info: PowerFlow solve converged, the results have been stored in the system
[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1
[ Info: Residual from initial guess: max = 9.82774084334892e-10 at 1268, total = 2.3309883363794544e-8
Iter     f(x) inf-norm    Step 2-norm 
------   --------------   --------------
[ Info: Initialization non-linear solve succeeded with a tolerance of 1.0e-9 using solver trust_region. Saving solution.
[ Info: Attaching Perturbations
[ Info: Simulations status = BUILT
┌ Info: 
│  ───────────────────────────────────────────────────────────────────────────────
│                                                      Time          Allocations  
│                                                ───────────────   ───────────────
│                 Total measured:                     8.99s             803MiB    
│ 
│  Section                               ncalls     time    %tot     alloc    %tot
│  ───────────────────────────────────────────────────────────────────────────────
│  Build Simulation                           1    8.99s  100.0%    803MiB  100.0%
│    Build Simulation Inputs                  1   6.31ms    0.1%   7.33MiB    0.9%
│      Wrap Branches                          1   6.13μs    0.0%      208B    0.0%
│      Wrap Dynamic Injectors                 1   3.93ms    0.0%   2.47MiB    0.3%
│      Calculate MM, DAE_vector, Tota...      1    652μs    0.0%   1.90MiB    0.2%
│      Wrap Static Injectors                  1    430μs    0.0%    290KiB    0.0%
│    Pre-initialization                       1   19.1ms    0.2%   9.64MiB    1.2%
│      Power Flow solution                    1   13.1ms    0.1%   5.72MiB    0.7%
│      Initialize Static Injectors            1   1.20μs    0.0%     0.00B    0.0%
│      Initialize Dynamic Injectors           1   5.60ms    0.1%   3.76MiB    0.5%
│    Calculate Jacobian                       1    7.28s   81.0%    599MiB   74.6%
│    Make Model Function                      1   6.23ms    0.1%    154KiB    0.0%
│    Initial Condition NLsolve refine...      1    1.29s   14.3%    167MiB   20.9%
│    Build Perturbations                      1   18.1ms    0.2%    627KiB    0.1%
│    Make DiffEq Problem                      1    374ms    4.2%   18.2MiB    2.3%
│  ───────────────────────────────────────────────────────────────────────────────
└ 
Simulation Summary
┌─────────────────────────┬───────────────────┐
│ Property                │ Value             │
├─────────────────────────┼───────────────────┤
│ Status                  │ BUILT             │
│ Simulation Type         │ Mass Matrix Model │
│ Initialized?            │ Yes               │
│ Multimachine system?    │ Yes               │
│ Time Span               │ (0.0, 20.0)       │
│ Number of States        │ 2164              │
│ Number of Perturbations │ 1                 │
└─────────────────────────┴───────────────────┘

We will now run the simulation using OrdinaryDiffEq.jl solver Rodas4() by specifying the tolerance we want for the simulation. In our experience with this solver, solution times are faster when supplying information about the atol and rtol values as we can see in the example. The solver will also work with a specified dtmax but take a significantly longer time to solve. When using OrdinaryDiffEq.jl solvers always pass the option initializealg = NoInit() to avoid unnecessary re-initialization of the algebraic equations.

julia> execute!(
           sim_rodas,
           Rodas4(),
           saveat = 0.01,
           atol = 1e-10,
           rtol = 1e-10,
           initializealg = NoInit(),
       )SIMULATION_FINALIZED::BUILD_STATUS = 6

Read the results

After the simulation is completed, we can extract the results and make plots as desired. In this case, we will plot the voltage magnitude at the bus at which the line was connected.

julia> res_rodas = read_results(sim_rodas)Simulation Results Summary
┌────────────────────────────┬─────────────┐
│ Property                   │ Value       │
├────────────────────────────┼─────────────┤
│ System Base Power [MVA]    │ 100.0       │
│ System Base Frequency [Hz] │ 60.0        │
│ Time Span                  │ (0.0, 20.0) │
│ Total Time Steps           │ 2002        │
│ Number of States           │ 2164        │
│ Total solve time           │ 32.4767221  │
└────────────────────────────┴─────────────┘

Compare the results

After the simulation is completed, we can extract the results and make plots as desired. In this case, we will plot the voltage magnitude at the bus at which the line was connected. For both of the solution techniques.

julia> v1101 = get_voltage_magnitude_series(res_rodas, 1101);
julia> plot(v1101, label = "RODAS4");
julia> plot!(v1101_ida, label = "IDA");

plot