Downloaded from orbit.dtu.dk on: Dec 18, 2017 Accelerating interior point methods with GPUs for smart grid systems Gade-Nielsen, Nicolai Fog Publication date: 2011 Document Version Publisher's PDF, also known as Version of record Link back to DTU Orbit Citation (APA): Gade-Nielsen, N. F. (2011). Accelerating interior point methods with GPUs for smart grid systems [Sound/Visual production (digital)]. Workshop on "GPU Computing Today and Tomorrow", Kongens Lyngby, Denmark, 01/01/2011, http://gpulab.imm.dtu.dk/courses.html General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. Users may download and print one copy of any publication from the public portal for the purpose of private study or research. You may not further distribute the material or use it for any profit-making activity or commercial gain You may freely distribute the URL identifying the publication in the public portal If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim.
Accelerating interior point methods with GPUs for smart grid systems Nicolai Fog Gade-Nielsen D T U Department of Informatics and Mathematical Modelling Technical University of Denmark GPU Computing Today and Tomorrow, 2011 Technical University of Denmark Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 1 / 13
Outline 1 Introduction 2 Smart grid test case 3 Interior point method 4 Future plans Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 2 / 13
Introduction Introduction Ph.D. student at GPUlab, DTU IMM since November 2010. Title: Scientific GPU Computing for Dynamical Optimization Investigate GPUs for solving optimization problems, primarily model predictive control (MPC). Initial test problem is distribution and control of electrical power via smart grid through the use of MPC. Completed M.Sc. at DTU IMM in October 2010: Title: Implementation and evaluation of fast computational methods for high-resolution ODF problems on multi-core and many-core systems Used GPUs for ray tracing and matrix-free SpMV. Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 3 / 13
What is a smart grid? Smart grid test case Dynamically control energy production and consumption according to some objective, eg: Increased use of uncontrollable renewable power such as wind and solar. Lower production costs. Lower CO2 production. etc. Examples Heat pump control in houses Power plant production control Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 4 / 13
Smart grid test case Power plants in Denmark Image credit: Economic MPC for Power Management in the Smart Grid Tobias Gybel Hovgaard Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 5 / 13
Smart grid test case D T U Simple Economic MPC 1 Prediction horizon of N time steps. N p number of power plants with different properties. Properties on each power plant: Response time. Minimum and maximum change in one time step. Minimum and maximum power production. Cost. Simple example: Two power plants. A cheap but slow power plant. An expensive but fast power plant. Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 6 / 13
Smart grid test case Simple Economic MPC example Total Power 20 15 10 5 Production Reference 0 0 50 100 150 200 250 300 350 400 450 500 15 P.G. #1 10 5 0 0 50 100 150 200 250 300 350 400 450 500 15 P.G. #2 10 5 0 0 50 100 150 200 250 300 350 400 450 500 Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 7 / 13
Smart grid test case D T U Simple Economic MPC 2 Define power plant production as an economic MPC problem: min s.t. φ = g s + c x Ax s = b s 0 c is the cost and x is the control variables of each power plant in each time step. s is a slack variable and g is the cost of using it. A is our constraint matrix which encodes the constraints of each power plant and dynamics of the system. Very sparse and highly structured. Number of control variables: N p N + N Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 8 / 13
Interior point method IPM Algorithm (without Predictor-Corrector) While not converged do Compute duality gap. Set centering parameter. Compute residuals. Solve newton step. 0 A 0 x r L A 0 I λ = r s (1) 0 S Λ s r λ [ ] [ ] [ ] 0 A x r A D 1 = L λ r s Λ 1 (2) r λ D = S 1 Λ S = diag(s), Λ = diag(λ) Compute step length. Update step. Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 9 / 13
Interior point method Solving the Newton step Bottleneck: Solving the Newton step Normally solved with direct method: Compute the Hessian matrix and use Cholesky factorization. H A = A T (D)A Cholesky : H A = LL T Implemented using CUBLAS and MAGMA. What is MAGMA? The MAGMA project aims to develop a dense linear algebra library similar to LAPACK but for heterogeneous/hybrid architectures, starting with current "Multicore+GPU" systems. Very fast Cholesky factorization. Developed at University of Tennessee. Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 10 / 13
Results Interior point method 40 35 Speed up of using GPUs vs sequential CPU (Xeon E5620) Tesla C2070 (dense) Tesla C2070 (structured) GTX 590 (dense) GTX 590 (structured) 30 Speed up 25 20 15 10 5 1500 2000 2500 3000 Control variables Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 11 / 13
Problems Interior point method Ill-conditioning Normal equations -> condition number squared H A = A T (D)A Cholesky : H A = LL T In the later iterations of the IPM, either s i or λ i goes toward 0. 0 A 0 A 0 I x λ = r L r s (1) 0 S Λ s r λ [ ] [ ] [ ] 0 A x r A D 1 = L λ r s Λ 1 (2) r λ D = S 1 Λ S = diag(s), Λ = diag(λ) Loss of sparsity N p = 1000, N = 48: 48048 decision variables. 48048 2 hessian matrix to factorize: about 17 GB. Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 12 / 13
Future plans D T U Future plans Iterative methods and preconditioning Identify iterative solvers for solving the newton step iteratively. Identify good preconditioners. Evaluate which of the solvers and preconditioners are suitable for GPU implementation. Create toolbox for solving optimization problems using GPUs Smart grid problems used as test case for toolbox. Nicolai Fog Gade-Nielsen (GPUlab) Accelerating IPMs with GPUs for SG systems DTU 2011-08-18 13 / 13