PowerModels Timeseries Simulation

Hello,

I am new to PowerModels and looking forward to learning more.
I have a power network, along with generation data and renewable energy resource data. I want to run this grid for at least 1 day at hourly intervals using the load and generation data.
Is there a feature I am missing that easily allows timeseries options, or will this be a more manual endeavor?

Thanks,
Jasmine

Hi @PB-vines, welcome to the forum :smile:

PowerModels.jl is intended for static single-period power flow problems.

There is some very limited support for “multi-networks” which could include time-series: Multi Networks · PowerModels

The big question is whether you want to solve the problem is a single monolithic optimization problem with all 24 hourly intervals, or whether you want to implement some sort of decomposition approach, such as a rolling-horizon.

For rolling horizon problems, see: Rolling horizon problems · JuMP

PowerSimulations.jl is a package that builds upon PowerModels.jl to perform exactly the sort of simulations you want. See their documentation at Welcome Page · PowerSimulations.jl

The correct approach depends quite heavily on your intended use-case. How big is the network? What format is the input data in? etc.

2 Likes

You might be looking for PowerSimulationsDynamics.jl which does the dynamic simulations?

https://nrel-sienna.github.io/PowerSimulationsDynamics.jl/stable/quick_start_guide/

Is there a straightforward way to convert a powermodels network to a powersimulations network - or a matpower network to a powersimulations network? my network has 897 buses so looking for an automated way to do this. Thanks!

See ...parse data from MATPOWER or PSS/e files · PowerSystems.jl

1 Like

That is great, thank you so much! I have managed to get the network imported and everything. I think my last question - I have tried a few ways below to import load and solar data from csv and add to my system. I have over 200 load buses, so I do not want to do this manually - the data is hourly for one year. Do you see off-hand what I am doing incorrectly?

load_data = CSV.read(“load_time_series_MW.csv”, DataFrame)

solar_data = CSV.read(“renewable_time_series_MW.csv”, DataFrame)

load_buses = names(load_data)[contains.(names(load_data), “MW”)] # Find all MW columns for load
solar_buses = names(solar_data)[contains.(names(solar_data), “608”)] # Find all 608xxxx columns for solar

Create time series dictionaries for loads and solar

# For load timeseries

load_timeseries_dict = Dict(

bus => ActivePowerTimeSeriesParameter(load_data[:, bus]) for bus in load_buses

)

# For solar timeseries

solar_timeseries_dict = Dict(

bus => ActivePowerTimeSeriesParameter(solar_data[:, bus]) for bus in solar_buses

)

Now combine them into a container

timeseries_container = Dict(

:load => load_timeseries_dict,

:solar => solar_timeseries_dict

)

timeseries_container = Dict(
:load => Dict(bus_symbols[i] => load_timeseries[:, i] for i in 1:length(bus_symbols)),
:solar => Dict(solar_symbols[i] => solar_timeseries[:, i] for i in 1:length(solar_symbols))

)

bus_symbols = [Symbol(replace(col, " " => “", “#” => “”)) for col in load_columns]
solar_symbols = [Symbol(replace(col, " " => "
”, “#” => “”)) for col in solar_columns]

Create the time series container mapping buses to their time series

timeseries_container = Dict(
:load => Dict(bus_symbols[i] => load_timeseries[:, i] for i in 1:length(bus_symbols)),
:solar => Dict(solar_symbols[i] => solar_timeseries[:, i] for i in 1:length(solar_symbols))

)

Now attach the time series to the system ‘sys’

set_time_series!(sys, timeseries_container)