WISPO-POP / CATS-CaliforniaTestSystem

A geographically-accurate synthetic electric grid located in California.
BSD 3-Clause "New" or "Revised" License
25 stars 8 forks source link

Question regarding Pandapower conversion (not so much an issue) #3

Open RJEllis-HTC opened 10 months ago

RJEllis-HTC commented 10 months ago

Developers and anyone else who may pass by

Firstly thanks for the effort in designing this network it is very useful

I have used the built in functions of Pandapower to convert the MATPOWER case to a Pandapower net, which appears to work with no problems - the net looks like any other pandapower net. https://pandapower.readthedocs.io/en/v2.13.1/converter/matpower.html

I am not expecting a fix etc... as this is designed for MATPOWER, but I wondered if anyone related to the project had any success with conversion and running in Pandapower.

AC powerflow does not converge, DC powerflow does not appear to work as expected. Built-in OPF algorithms are also problematic with convergence issues.

noahrhodes commented 9 months ago

Thank you for sharing! Regarding the convergence issues, we can give some details that may be helpful to you and other people who have had similar issues.

We've found that our approach of turning the GIS line data into powerlines with R, X, and B values resulted in some very short lines and some longer lines with a wide range of parameter values. This is also possible in real grid models, as bus ties or short transmission lines connecting two sides of a substation can be modeled as very low impedance branches. However, this results in very small impedance values which may pose challenges for the stability of numerical methods.

When creating CATS, we tested it by solving the optimal power flow (OPF) problem formulations in the PowerModels.jl package (using Julia/JuMP). While we have not used Pandapower, some other users have also had numerical/convergence issues with CATS. Typically, this arises when numerical methods like Newton-Raphson are used to solve power flow, rather than using optimization with an optimization solver like Ipopt, HiGHS, or Gurobi. Optimization solvers can scale parameters to mitigate numerical issues (either by default or by setting solver attributes), or use higher precision number formats but note that this may result in longer solve times.

PowerWorld is a commercial OPF solver, and it has a zero branch resistance (ZBR) threshold, where it will combine buses connected by branches below this threshold, thus eliminating small impedance lines. The default threshold in PowerWorld is 2e-4.

Another user group, using optimization in Python/Pyomo, has found the following methods to be helpful:

We are debating whether to modify CATS to address this challenge. We will keep the current grid model as is, to maintain accuracy with the GIS data of California's actual electric infrastructure. However, we may consider creating a 'simplified' model that merges buses and omits short powerlines to improve the numerical qualities of the model.

Let us know if you have any thoughts and how you are considering using this model!

RJEllis-HTC commented 9 months ago

@noahrhodes thanks so much for the reply there is a lot of direction for me here - I have already gone down the PowerModels and Ipopt route, it turns out Pandapower can utilise both via pycall from inside python and this had lead to better results for me. Pandapower diagnostic also highlighted impedance issues you mention.

I agree that a simplified model would be really interesting and useful.

With regards to application - were currently trying to use your model for reliance research - our team mainly comprises of Remote Sensing experts, we are simulating line and tower damage impacts and then trying to determine optimised load shedding responses (with different ML approaches). One of the important things has been high speed repeat simulations which is why using the PowerModels method above might not be suitable - I think its working well but convergence takes a little while and when we need many iterations computation time becomes significant - a simplified model might be useful to help with that bottle neck