4 ms·
Haha. Great question. Power Transmission. When you model the transmission grid, you can solve for the flows on the equipment (lines and transformers) where the
by new4thaccount 7y ago
Haha. Great question. Power Transmission.
When you model the transmission grid, you can solve for the flows on the equipment (lines and transformers) where the inputs are certain equipment parameters as well as generation and load values. This is called powerflow or loadflow and the traditional Newton-Raphson method represents the equations in Jacobian form where the sensitivities represent how real and reactive power is impacted by the bus voltages and bus phase angles. This solution takes voltage into account (pretty important) and forms the basis of many computationally intensive operations such as contingency analysis (also known as N-1). You basically determine before the analysis which equipment you want to monitor and then you have a list of contingencies that you want to guard against. The grid itself is a pretty massive NxN matrix that is thankfully both sparse and symmetric. When you simulate a contingency, you take it out of service in the model and then re-solve the AC powerflow. For each of those solves, you check that the bus voltages are ok and that the equipment is within the rated limits. Violations are reported to the user. There are other calcs that are also important and that use the Jacobian. I think one reason this area hasn't received much GPU attention is that the problem is easy enough to parallelize and most vendors do so now, so a server with a decent amount of cores can whittle away at even large grids with thousands of contingencies in a reasonable amount of time. Less important studies that need to be quick and robust use the DC powerflow which is linearized and doesn't show voltage impact.
There are many entities that monitor this in real-time, but transmission planners work with text file based models and will run millions of contingencies with computer clusters in a batch mode and dump the results in Excel or a SQL database. I'm not sure if a high end GPU would help there or if it is just a throw more CPU cores kind of problem.
How much would it be worth? It is tough to say. I'd have to know how well GPUs perform here. I'm guessing it is not as good, but I'm not knowledgeable here. If you had a product that bundled GPU, GPU-based power systems analysis software and a client that would run on desktop with an API, AND it performed significantly faster than the competition, you might have some customers. That is a ton of upfront work though.
- vsskanth 7y agoPlease forgive me if I'm wrong but this sounds like a sparse jacobian problem? There are solvers that seem to support this (esp. Julia) using GPUs. I believe Boost odeint also supports this.
- new4thaccount 7y agoYep, the Jacobian is sparse. I'm using Julia a bit for work and play, but don't own a GPU to test out their GPU support quality. Does anyone (I assume the poster I originally replied to) know which situations are even worth it to is solve the Jacobian on a GPU? One of the questions I have about the Julia diffeq module is how many simultaneous equations can it take? Is it thousands?
- newen 7y agoLooks like you can transfer sparse matrices to the GPU and use cuSOLVER to solve least-squares [1] but there isn't a nice interface for it yet (https://github.com/JuliaGPU/CuArrays.jl/blob/master/test/sparse_solver.jl https://github.com/JuliaGPU/CuArrays.jl/blob/master/test/spa...).
- ChrisRackauckas 7y agoDifferentialEquations.jl can take as many simultaneous equations as you have memory for. You can even use an MPIArray when you run out. When we solve PDEs, sometimes I'm testing with a state space of tens of millions of ODEs of course, which comes from a Method of Lines discretization. Right now we are doing a lot of tests in the thousands of ODEs range since we have a reader for chemical reaction networks which we are using to optimize on test models. This is all with directly writing the Julia functions. If you question is, how far can ModelingToolkit be pushed? That's unknown. We made sure it's quite an efficient representation, but we haven't stress tested it to see the memory consumption at a million operations yet. Since it's able to generate thousands of operations in symbolic Jacobian inversions, it easy goes to thousands and tens of thousands of equations. How much larger? Who knows. What we can say is that its efficiency is more similar to SymEngine's symbolic types, so if SymEngine handles the millions of equations range (on a computer with enough RAM, symbolic representations may use up quite a bit here!) than we should be able to.
- new4thaccount 7y agoWow...again this is all really impressive as is you taking the time to reply. I'm looking forward to starting to play with these new libraries. Is there a more focused place to talk about Julia applied to numerical work (linear algebra and nonlinear equation solvers).
- Certhas 7y agoI work on the research side on some Julia code for power grids, we're mostly focused on dynamics and transients, not load flow. GPUs are definitely on our radar, as are automatically extracted Jacobians. None of this is industry grade though, at least for the time being. Drop me a line if you want: Certhas@gmail.com
- new4thaccount 7y agoSounds like some pretty cool research and good luck! I work with folks who manage large dynamics models for transient stability tasks, but have only been partially involved myself as I'm more focused on the market side, but dabble in other areas. The math definitely looks more challenging for dynamics simulations (I usually only browse through the dynamics sections in textbooks, but plan on learning more when I finally start my masters program). I'll send you an email sometime in the near future for some discussion. If you're using Julia for grid work, you're probably either one of the firms listed on their success stories, or one of the national labs. Either of which sounds interesting from one engineer to another.