Top Banner
Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems Anatoly Zlotnik July 22, 2020 Department of Mathematics Friedrich-Alexander-Universität Erlangen-Nürnberg LA-UR-20-25167
94

Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Aug 16, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Operated by Los Alamos National Security, LLC for the U.S. Department of Energy's NNSA

Practical Mathematical Modeling for Simulation,

Estimation, and Optimal Control of Gas Pipeline Systems

Anatoly Zlotnik

July 22, 2020

Department of Mathematics

Friedrich-Alexander-Universität Erlangen-Nürnberg

LA-UR-20-25167

Page 2: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Los Alamos National Laboratory

7/21/2020 | 2Los Alamos National Laboratory

• Federally Funded Research and Development Center

• Operated by National Nuclear Security Administration of U.S. Department of Energy

• Solve complex, interdisciplinary, multi-physics problems

• Advanced Network Science Initiative – https://lanl-ansi.github.io/

– Interdisciplinary team with expertise in physics, applied math, statistics, optimization, electrical and

mechanical engineering, computer science, software development, and cloud computing

– Theoretical and algorithm development for complex infrastructure optimization and control problems

– Provide third-party, independent, science-based input into complex problems of national concern

• Extensive reach back to other science-based capabilities

– Space science and space weather

– Earth and environmental science

– Chemistry and biology

– Extreme physics and effects

Page 3: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Collaboration

7/21/2020 | 3Los Alamos National Laboratory

Scott

BackhausRussell

Bent

Michael

Chertkov

Conrado

Borraz-SanchezSidhant

MisraHarsha

NagarajanMarc

Vuffray

Line

Roald

Alex

Korotkevich

Sergey

Dyachenko

Hassan

Hijazi

Pascal Van

Hentenryck

Terrence

Mak

Alex

Rudkevich

Richard

Tabors

Pablo

RuizMichael

Caramanis

Antonio

Conejo

Fei

Wu

Bining

Zhao

Ramteen

Sioshansi

Xindi

Li

Richard

Carter

Daniel

Baldwin

Anthony

Giacomoni

Russ

Philbrick

John

Goldis

Kaarthik

Sundar

Page 4: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Outline

7/21/2020 | 4Los Alamos National Laboratory

• Energy infrastructure challenges

• Inspiration from the power grid

• Modeling physics & engineering of gas pipelines for large-scale control

• Gas market design using pipeline optimization

• State and parameter estimation

• Monotonicity properties and modeling implications

• Coordination of electricity and gas transmission

Page 5: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Energy infrastructure challenges

7/21/2020 | 5Los Alamos National Laboratory

Page 6: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Grid modernization

7/21/2020 | 6Los Alamos National Laboratory

• Distributed generation, microgrids

• Increasing penetration of clean, renewable energy (20% renewables by 2030)

• New methods for automatic and responsive grid control – “smart grid”

Page 7: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Electricity production today

7/21/2020 | 7Los Alamos National Laboratory

• Electricity production by source in the United States (2019)

– Gas: 38.4%, coal: 23.5%, nuclear: 19.7%,

– Renewable 17.5% (wind: 7.3%, solar 1.8%)

• Significant construction of natural gas-fired power plants

(Source: US EIA)

Page 8: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Filling the demand curve

7/21/2020 | 8Los Alamos National Laboratory

• Gas-fired generation is used to fill the demand curve

• “Duck curve” in areas with high solar penetration

• Requires gas-fired generators to ramp up production quickly

Page 9: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Energy systems are now coupled

7/21/2020 | 9Los Alamos National Laboratory

• Power & gas transmission

infrastructures are

coupled through gas

generators

• Gas pipeline loads are

Increasing, and becoming

more variable/intermittent

• The coupling is

strengthening, as seen in

simultaneous price spikes

(ISO New England)

Page 10: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

• Electricity production by source in

Germany (2019)

– Coal: 29%, natural gas: 10%, nuclear: 14%.

– Wind: 25%, solar: 9.1%, biomass: 8.7%,

hydroelectricity: 3.7%.

(Source: Fraunhofer, US EIA)

Generation Fuel Mix in Germany

7/21/2020 | 10Los Alamos National Laboratory

Page 11: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

• Electricity production by source in European Union (2017)

– Coal: 20%, natural gas: 21%, nuclear: 25%.

– Wind: 11%, solar: 4%, biomass: 6%, hydroelectricity: 10%.

(Source: Eurostat)

Generation Fuel Mix in European Union

7/21/2020 | 11Los Alamos National Laboratory

Page 12: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Energy systems are now coupled

7/21/2020 | 12Los Alamos National Laboratory

• Power & gas transmission infrastructures are coupled through gas generators

• Gas pipeline loads are Increasing, and becoming more variable/intermittent

High Voltage Electricity Transmission High Pressure Natural Gas Transport

Page 13: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Gas pipeline operations

7/21/2020 | 13Los Alamos National Laboratory

• Natural Gas is traded in regulated markets

– Bilateral transactions between buyers & sellers for steady

ratable flows

• Transmission pipelines sell gas transportation to

shippers (buyers and sellers)

– Marketing and scheduling is time-consuming, not optimized

– Human operators manage fragmented systems reactively,

in real-time

– Business processes are daily, not hourly

– Business and operating standards vary by company

• Gas delivery may not adjust in real time

– Possible disparity between scheduled and actual gas flows

and pressures in normal operations

– Limited ability to react to unplanned contingencies

Page 14: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Inspiration from the power grid

7/21/2020 | 14Los Alamos National Laboratory

Page 15: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Power grid basics

7/21/2020 | 15Los Alamos National Laboratory

Page 16: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

• Real-time pricing in electricity markets

– Optimal power flow provides generation setpoints

– Market administered for a geographic footprint

– Shadow prices are posted as real-time prices

– Locational Marginal Prices (LMPs) for electricity

• Gas pipeline management is less responsive

– Separate companies in the same geographic footprint

– Operations typically do not use optimization

• Goal: Locational Trade Values (LTVs) for natural gas

– Nodal pricing of natural gas delivery over a pipeline network

– Obtained by single price two-sided auction mechanism

– Account for pipeline structure, physics and engineering

– Generate hourly updates

Motivation

7/21/2020 | 16Los Alamos National Laboratory

$800

$6

PJM Interconnection price per MWh

July 19, 2013 heat wave

Page 17: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Motivation

7/21/2020 | 17Los Alamos National Laboratory

• Model-predictive optimal control of gas pipelines

– Old paradigm: Given predicted flow profiles, how to operate compressors such that

pressure remains within set limits (if possible)?

– New paradigm: Given price/quantity bids of shippers, what is the best allocation of

flows, and feasible compressor control, so pressure remains within limits (guaranteed)?

• Previous work:

– Objective function: minimize energy used by compressors

– Subject to known withdrawals of gas from the network and physical constraints

Andrzej Osiadacz (University of Warsaw)

Hans Aalto (Neste Jacobs)

Mohammad Abbaspour (Kansas State University / Kinder Morgan)

Richard Carter (Advantica / DNV-GL)

Marc Steinbach (Zuse Institute Berlin)

Page 18: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Modeling physics & engineering of gas pipelines for

large-scale control

7/21/2020 | 18Los Alamos National Laboratory

Page 19: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Challenges and approach

• What to consider in gas pipeline modeling

– Systems are large, distributed, complex, with many degrees of freedom

– Pressure, flow, and line pack changes propagate slowly; dynamics are highly nonlinear

– Boundary flows are always changing; flow never stabilizes to steady-state

– Thermal effects are highly localized (near compressors)

– Flow scheduling and compressor operations do not use optimization or model-based engineering

– Experience-based decisions and labor intensive control by human operators

• Our approach

– Consider basic components: pipes and compressors that connect nodes

– Model physical relationships (pressure, flow, compression)

7/21/2020 | 19Los Alamos National Laboratory

Page 20: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Modeling goals for transient optimization

7/21/2020 | 20Los Alamos National Laboratory

• Network nodes: physical nodes and custodial meter stations

• Network edges: pipes that connect nodes

• Compressors: machines that boost pressure

• Management objectives: operational or economic

– Operational: minimize cost of operations (energy use of compressors)

– Economic: maximize profit of gas delivery to buyers minus cost of gas supplied

• Conducted subject to engineering constraints on gas pipeline network

– Physics of pressure and flow on each pipe

– Flow balance at nodes

– Constraints on compressors

• Control parameters

– Compressor operations

– Nodal injections or withdrawals

Page 21: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Modeling for Transient Optimization

7/21/2020 | 21Los Alamos National Laboratory

Network Control

DynamicOptimization

Scalable Solver

(Sparse)

Algorithms

Computation

Modeling

Complex Fluid Dynamics

(PDEs)

Reduced Models(ODEs)

Physics

Network Science

Optimal Dynamic Compression Controls and Flow Schedule (solution)

Spatiotemporal Gas Withdrawal Constraints

(input)

Feasible System-wide Pressure(result)

High-fidelity simulation(validation)

Coarse-grained optimization(solution)

Page 22: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Physics on a pipe

7/21/2020 | 22Los Alamos National Laboratory

Isothermal Euler equations in one dimension:

• Mass conservation: 𝜕𝑡𝜌 + 𝜕𝑥 𝑢𝜌 = 0

• Momentum balance: 𝜕𝑡 𝜌𝑢 + 𝜕𝑥 𝜌𝑢2 + 𝜕𝑥𝑝 = −𝜆𝜌𝑢 𝑢

2𝐷− 𝜌𝑔sin(𝜃)

• State equation: 𝑝 = 𝑍𝑅𝑇𝜌

• 𝜌 ≡ density (kg/m3), 𝑝 ≡ pressure (Pa), 𝑢 ≡ velocity (m/s),

𝐷 ≡ diameter (m), 𝜆 ≡ friction factor, 𝜃 ≡ pipe angle (deg),

𝑍 ≡ gas compressibility factor, 𝑅 ≡ ideal gas constant (J/kg K),

𝑇 ≡ Temperature (K), 𝑔 ≡ velocity (m2/s),

Assume isothermal, simplified flow in a horizontal pipe without shocks:

• 𝑎 = 𝑍𝑅𝑇 is constant speed of sound (m/s),

• Neglect advection term 𝜕𝑥(𝜌𝑢2) and set 𝜃 = 0

• Define flow rate 𝜙 = 𝜌𝑢 (kg/m2/s)

Simplified equations: 𝜕𝑡𝜌 + 𝜕𝑥𝜙 = 0

𝜕𝑡𝜙 + 𝑎2𝜕𝑥𝜌 = −𝜆

2𝐷

𝜙 𝜙

𝜌

Page 23: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Reduced modeling of a pipeline segment

7/21/2020 | 23Los Alamos National Laboratory

Pipeline system model is an actuated PDE system on a metric graph:

• Set of nodes (junctions) 𝒱 and edges (pipes) ℰ

• Edges 𝑖, 𝑗 ∈ ℰ of length 𝐿𝑖𝑗, diameter 𝐷𝑖𝑗, and friction coefficient 𝜆𝑖𝑗

• Flow 𝜙𝑖𝑗 𝑡, 𝑥𝑖𝑗 and density 𝜌𝑖𝑗 𝑡, 𝑥𝑖𝑗 on an edge 𝑖, 𝑗 ∈ ℰ are continuous functions

of distance 𝑥 at all times 𝑡

Notations and definitions:

• Boundary densities 𝜌𝑖𝑗 𝑡 = 𝜌𝑖𝑗 𝑡, 0 and 𝜌𝑖𝑗𝑡 = 𝜌𝑖𝑗 𝑡, 𝐿

• Boundary flows 𝜙𝑖𝑗 𝑡 = 𝜙𝑖𝑗 𝑡, 0 and 𝜙𝑖𝑗𝑡 = 𝜙𝑖𝑗 𝑡, 𝐿

• Edges 𝑖, 𝑗 ∈ ℰ of length 𝐿𝑖𝑗, diameter 𝐷𝑖𝑗, and friction coefficient 𝜆𝑖𝑗

• Pressure nodes 𝑗 ∈ 𝒱𝑆 ⊂ 𝒱 with given density 𝑠𝑗 for 𝑗 ∈ 𝒱𝑆

• Flow nodes 𝑗 ∈ 𝒱𝐷 ⊂ 𝒱 with flow withdrawal (injection) 𝑑𝑗 for 𝑗 ∈ 𝑉𝐷

• Auxiliary nodal pressure variables 𝜌𝑗 for 𝑗 ∈ 𝒱𝐷

• Compressors for 𝑖, 𝑗 ∈ 𝒞 ⊂ ℰ modeled as boost from a node to pipe boundary:

𝜌𝑖𝑗 𝑡 = 𝛼𝑖𝑗𝜌𝑖 or 𝜌𝑖𝑗𝑡 = 𝛼𝑖𝑗𝜌𝑗 as appropriate

Weymouth equations in steady state:

• 𝜌𝑖𝑗2 − 𝜌

𝑖𝑗

2=

𝜆𝐿

𝐷𝑎2𝜙𝑖𝑗|𝜙𝑖𝑗| or 𝑝𝑖𝑗

2 − 𝑝𝑖𝑗

2= 𝛽𝑖𝑗𝜙𝑖𝑗|𝜙𝑖𝑗|, where 𝛽𝑖𝑗 =

𝜆𝐿𝑎2

𝐷

Page 24: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Flow balance (Kirchhoff-Neumann conditions):

𝑑𝑗 =

𝑖∈𝜕+𝑗

𝑋𝑖𝑗𝜙𝑖𝑗−

𝑖∈𝜕−𝑗

𝑋𝑖𝑗𝜙𝑖𝑗 ∀𝑗 ∈ 𝒱

Aggregate compressor stations to point objects:

Pressure boost by compressors:

𝜌𝑖𝑗 𝑡 = 𝛼𝑖𝑗𝜌𝑖 or 𝜌𝑖𝑗𝑡 = 𝛼𝑖𝑗𝜌𝑗 ∀(𝑖, 𝑗) ∈ ℰ

Modeling nodes and compressors

7/21/2020 | 24Los Alamos National Laboratory

Page 25: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Pipeline simulation: predictive analytics

7/21/2020 | 25Los Alamos National Laboratory

Initial Pressure Inlet Pressure Outlet Flow

Outlet Pressure Inlet Flow

Pipeline simulation

Inputs

• Initial conditions (pressure and flow)

• Either flow or pressure at each node over a

time interval T

Simulation

• Initial value problem with unique solution

Outputs

• Flows and pressures throughout the system

Page 26: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Simulation of catastrophic depressurization

7/21/2020 | 26Los Alamos National Laboratory

Boundary Conditions for Damage

• Change boundary condition at location node 𝑗 from

time 𝑡𝑑 of depressurization to 𝑝𝑗 𝑡 =𝑝atm for 𝑡 ≥ 𝑡𝑑

Boundary Conditions for Containment

• Set flow at upstream and downstream pipe

endpoints to 𝜙𝑖𝑗 𝑡 = 0 and 𝜙𝑗𝑘

𝑡 = 0 for 𝑡 ≥ 𝑡𝑐,

where 𝑡𝑐 = 𝑡𝑑 + 𝑡Δ is the valve closing time and 𝑡Δis the time elapsed until operators take action

• R. Hajossy, I. Mračka, P. Somora, and T. Žáčik, “Cooling of a wire as the model for a rupture location”, Mathematical

Institute, Slovak Academy of Sciences, In PSIG Annual Meeting. Pipeline Simulation Interest Group, 2014.

Page 27: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Pipeline flow in catastrophic depressurization

7/21/2020 | 27Los Alamos National Laboratory

Simulation of pressure, first 50 seconds after rupture

0

1000000

2000000

3000000

4000000

5000000

6000000

0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000

Pressure

sec -1 Pressure sec 0 Pressure sec 1 Pressure sec 2 Pressure

sec 3 Pressure sec 5 Pressure sec 6 Pressure sec 7 Pressure

sec 8 Pressure sec 9 Pressure sec 10 Pressure sec 11 Pressure

sec 20 Pressure sec 30 Pressure sec 40 Pressure sec 50 Pressure

Pre

ssu

re, P

a

Distance, m

A B

A B

Page 28: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

-2000

-1500

-1000

-500

0

500

1000

1500

2000

0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000

Flow

sec -1 Mass flow sec 0 Mass flow sec 1 Mass flow sec 2 Mass flow

sec 3 Mass flow sec 5 Mass flow sec 6 Mass flow sec 7 Mass flow

sec 8 Mass flow sec 9 Mass flow sec 10 Mass flow sec 11 Mass flow

sec 20 Mass flow sec 30 Mass flow sec 40 Mass flow sec 50 Mass flow

Pipeline flow in catastrophic depressurization

7/21/2020 | 28Los Alamos National Laboratory

Simulation of mass flow, first 50 seconds after ruptureF

low

, kg/s

Distance, m

A B

A B

Page 29: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

200

210

220

230

240

250

260

270

280

290

300

0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000

Temperature

sec -1 Temperature sec 0 Temperature sec 1 Temperaturesec 2 Temperature sec 3 Temperature sec 5 Temperaturesec 6 Temperature sec 7 Temperature sec 8 Temperaturesec 9 Temperature sec 10 Temperature sec 11 Temperaturesec 20 Temperature sec 30 Temperature sec 40 Temperaturesec 50 Temperature

Pipeline flow in catastrophic depressurization

7/21/2020 | 29Los Alamos National Laboratory

Simulation of temperature, first 50 seconds after rupture

Te

mp

era

ture

, d

egre

es K

Distance, m

A B

A B

Page 30: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Model validation using real data set

7/21/2020 | 30Los Alamos National Laboratory

• Reduced model of subsystem used for capacity

planning for a real pipeline

– 78 nodes, 91 pipes, 4 compressors 31 custody transfer

meters at 24 locations (labelled A to X)

– Hourly SCADA time-series of pressure and flow at

meters for a month during “polar vortex” conditions

– Model is validated in resolving hourly pressure

dynamics with less than 3% relative error

• Comparing relative distance (%) of SCADA

vs. simulation

– Pressure at flow nodes B to X

• Mean error: 4.17%

– Mass flow into system at node A

• Mean error: 2.45%

Pipeline subsystem model

• Meter stations

• Compressors

x distance (miles)

Pipeline diagram (not to scale)

• Zlotnik, Anatoly V., Aleksandr M. Rudkevich, Evgeniy Goldis, Pablo A. Ruiz, Michael Caramanis, Richard G. Carter, Scott N.

Backhaus, Richard Tabors, and Daniel Baldwin. “Economic optimization of intra-day gas pipeline flow schedules using

transient flow models.” in Proc. Pipeline Simulation Interest Group Annual Conf., 1715, Atlanta, GA, May 2017.

Page 31: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Transient optimization: decision analytics

7/21/2020 | 31Los Alamos National Laboratory

Inputs

• Desired outlet flow

• Objective (minimize compressor power)

Optimization

• A decision among many possibilities for the

best solution

Outputs

• Control of pressure by compressors

Results

• Guarantee feasibility for inequality constraints

• Optimal solution

Feasible Outlet Pressure Feasible Inlet Flow

Validation Simulation

Transient Optimization

Initial Pressure Outlet FlowControl: Inlet Pressure

Page 32: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Modeling gas pipelines for control

7/21/2020 | 32Los Alamos National Laboratory

Kg/

s

bo

ost

rat

io

Pressure trajectories

Flow trajectories

Compression Controls (solution)

time (24 hours)

Example system • 5 compressors, 8 loads, 1 source• 300 miles of pipes

Load profiles

• Zlotnik, Anatoly, Michael Chertkov, and Scott Backhaus. "Optimal control of transient flow in natural gas networks." In

Decision and Control (CDC), 2015 IEEE 54th Annual Conference on, pp. 4563-4570. IEEE, 2015.

• Model-predictive

optimal control of gas

pipelines

– Old paradigm: Given

predicted flow profiles,

how to operate

compressors such that

pressure remains within

set limits (if possible)?

Page 33: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Pipeline as conservation laws on directed metric graph

7/21/2020 | 33Los Alamos National Laboratory

Page 34: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Approximation with Nodal Boundary Conditions

7/21/2020 | 34Los Alamos National Laboratory

Page 35: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Graph representation of flow balance

7/21/2020 | 35Los Alamos National Laboratory

Page 36: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Graph representation of density gradients

7/21/2020 | 36Los Alamos National Laboratory

Page 37: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Matrix Differential Algebraic Equations

7/21/2020 | 37Los Alamos National Laboratory

Page 38: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Matrix Differential Algebraic Equations

7/21/2020 | 38Los Alamos National Laboratory

Page 39: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Matrix Differential Algebraic Equations

7/21/2020 | 39Los Alamos National Laboratory

Page 40: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Comparing discretization schemes

7/21/2020 | 40Los Alamos National Laboratory

Alternative discretizations• In space: trapezoidal rule (TZ)

and lumped elements (LU) • In time: pseudospectral

approximation (PS) and trapezoidal rule (TZ)

• Tested by two-stage scheme• First stage minimizes

compressor energy

• Second stage minimizes solution variation

• Mak, Terrence W. K., Hentenryck, P. V., Zlotnik, A., & Bent, R. (2019). Dynamic compressor optimization in natural gas

pipeline systems. INFORMS Journal on Computing, 31(1), 40-65.

Page 41: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Comparing discretization schemes

7/21/2020 | 41Los Alamos National Laboratory

TZ-TZ LU-TZ

TZ-PS LU-PS

Space-Time Schemes

Lumped Elements + Trap• Fastest and most accurate• Used in implementations

• Mak, Terrence W. K., Hentenryck, P. V., Zlotnik, A., & Bent, R. (2019). Dynamic compressor optimization in natural gas

pipeline systems. INFORMS Journal on Computing, 31(1), 40-65.

Page 42: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Gas market design using pipeline optimization

7/21/2020 | 42Los Alamos National Laboratory

Page 43: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Inputs and outputs

7/21/2020 | 43Los Alamos National Laboratory

• Input: static network model

– Junctions (nodes)

– pipes (edges)

– compressor stations (controllers)

– custody transfer meters (at nodes)

• Input: hourly bid from each shipper

– Pre-existing (ratable) flow schedule

– Bid or offer prices

– Upper limits on gas injections and

withdrawals at each price level (hourly)

• Output: physical solution

– Pressures and flows through the pipeline

– Compressor controls (discharge pressure)

– Validated in simulation, to control room

• Output: market solution

– Locational trade values (LTVs)

give real-time and forward prices

– Flow profiles of increment or decrease

w.r.t. ratable nomination (private to each

shipper)

Page 44: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Constraints on compressors:

• Maximum compressor power: 𝜂𝑖𝑗 𝜙𝑖𝑗 𝛼𝑖𝑗2𝑚 − 1 ≤ 𝐸𝑖𝑗

max

∀ 𝑖, 𝑗 ∈ 𝒞• Minimum boost ratio: 𝛼𝑖𝑗 ≥ 1 ∀ 𝑖, 𝑗 ∈ 𝒞

Constraints on pipe pressure:

• Minimum pressure: 𝑝𝑗 ≥ 𝑝𝑗min ∀𝑗 ∈ 𝒱

• Maximum pressure: 𝛼𝑖𝑗𝑝𝑗 ≤ 𝑝𝑖𝑗max ∀ 𝑖, 𝑗 ∈ ℰ

Objective:

• Reflect goals of pipeline system manager and security priorities

• Maximize economic value (social welfare) produced by the system

• Minimize energy cost (maximize efficiency) of running the system

• Prioritize critical assets

𝐽𝑀𝑆𝑊 =

𝑘∈𝒱

𝑐𝑘𝑜𝑑𝑘 −

𝑘∈𝒱

𝑐𝑘𝑠𝑠𝑘 −

𝑖,𝑗 ∈𝒞

𝜂𝑖𝑗 𝜙𝑖𝑗 𝛼𝑖𝑗2𝑚 − 1

Constraints and objective

7/21/2020 | 44Los Alamos National Laboratory

Page 45: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 45Los Alamos National Laboratory

Page 46: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 46Los Alamos National Laboratory

Objective: Social (Economic)

Welfare or Market surplus

(may be regularized by adding

Cost of compressor operation)

Page 47: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 47Los Alamos National Laboratory

Constraints and

Lagrange multipliers

Page 48: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 48Los Alamos National Laboratory

Equality (dynamic)

constraints: Partial Differential

Equations for gas flow dynamics

in terms of pressure and flow

Page 49: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 49Los Alamos National Laboratory

Equality constraints: Mass flow

balance at nodes separated into

baseline and optimized demand

and supply flows at transfer points

Page 50: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 50Los Alamos National Laboratory

Equality constraints: Pressure

boost of compressors, modeled as

relation between pressure

(density) at a node and at the pipe

boundary

Page 51: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 51Los Alamos National Laboratory

Inequality constraints:

Operating limits on pressure

inside each pipe (specifically,

upper bound in pipe, and lower

bound at nodes to guarantee

contractual pressure)

Page 52: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 52Los Alamos National Laboratory

Inequality constraints:

Operating limits on compressors

Specifically, upper bound on

applied power, and lower bound of

unity boost ratio (bypassed if off)

Page 53: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 53Los Alamos National Laboratory

Inequality constraints: Injection or

withdrawal to/from the system,

upper and lower bounds on supply

(injection) and demand (withdrawal)

Page 54: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 54Los Alamos National Laboratory

Participant bids: time-dependent

price and quantity bids of buyers

and sellers

Page 55: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Economic Optimal Control Formulation

7/21/2020 | 55Los Alamos National Laboratory

Locational Trade Values: time-

dependent nodal prices of gas and

spatiotemporal prices of momentum

(transportation) and mass (gas in

the pipe)

Page 56: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Time-periodic Formulation

7/21/2020 | 56Los Alamos National Laboratory

Well-posedness: time-periodicity

constraint for well-posed problem,

represents mass-preservation

Page 57: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Computational example

7/21/2020 | 57Los Alamos National Laboratory

Pipeline test network: 24 pipes, 5

compressors, 477 km

Input data: baseline flows and

price/quantity bids

Page 58: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Computational example

7/21/2020 | 58Los Alamos National Laboratory

Output: physical and price

solutions

Page 59: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

State and parameter estimation

7/21/2020 | 59Los Alamos National Laboratory

Page 60: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Representing uncertainty for estimation model

7/21/2020 | 60Los Alamos National Laboratory

• Account for uncertainty using a noise process η

– simplification of physical modeling

– Uncertainty in model parameters

– process and measurement noise

• Minimize estimation error using least squares objective

Page 61: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

State estimation problem

7/21/2020 | 61Los Alamos National Laboratory

Page 62: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Estimation for synthetic data

7/21/2020 | 62Los Alamos National Laboratory

Good model identification

for synthetic data:

• Kaarthik Sundar and Anatoly Zlotnik. “State and Parameter Estimation for Natural Gas Pipeline Networks Using Transient

State Data.” in IEEE Transactions on Control Systems Technology, 27:5, 2110 – 2124, 2019.

Page 63: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Joint state and parameter estimation for real data

7/21/2020 | 63Los Alamos National Laboratory

Pipeline subsystem model

• Meter stations

• Compressors

x distance (miles)

• Reduced model of subsystem used for capacity

planning for a real pipeline

– 78 nodes, 91 pipes, 4 compressors 31 custody transfer

meters at 24 locations (labelled A to X)

– Hourly SCADA time-series of pressure and flow at

meters for a month during congested conditions

Metered pressures (Mpa)Friction factor estimates

Page 64: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Monotonicity properties and modeling implications

7/21/2020 | 64Los Alamos National Laboratory

Page 65: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Physical flow network as a directed metric graph

7/22/2020 | 65Los Alamos National Laboratory

Page 66: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Physical flow network as a directed metric graph

7/22/2020 | 66Los Alamos National Laboratory

Page 67: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Distributed dynamics on edges

7/22/2020 | 67Los Alamos National Laboratory

Page 68: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Nodal compatibility conditions

7/22/2020 | 68Los Alamos National Laboratory

Page 69: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Well-posedness & regularity assumptions

7/22/2020 | 69Los Alamos National Laboratory

Page 70: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Well-posedness & regularity assumptions

7/22/2020 | 70Los Alamos National Laboratory

Page 71: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Theorem: monotone order propagation

7/22/2020 | 71Los Alamos National Laboratory

Page 72: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Application: monotone parameterized control systems

7/22/2020 | 72Los Alamos National Laboratory

Page 73: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Application: robust optimal control

7/22/2020 | 73Los Alamos National Laboratory

Page 74: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Application: friction-dominated models

7/22/2020 | 74Los Alamos National Laboratory

• Friction dominated modeling

– Omit flux derivative term, approximate hyperbolic system by parabolic one

– Proposed to simplify mathematical modeling for simulation and optimization

– Herty, Michael, Jan Mohring, and V. Sachers. "A new model for gas flow in pipe

networks." Mathematical Methods in the Applied Sciences 33, no. 7 (2010): 845-855.

• Monotonicity property for gas pipelines assumes friction-dominated flow

– Under what conditions are these assumptions valid?

𝜕𝑡𝜌 + 𝜕𝑥𝜙 = 0

𝜕𝑡𝜙 + 𝑎2𝜕𝑥𝜌 = −𝜆

2𝐷

𝜙 𝜙

𝜌

𝜕𝑡𝜌 + 𝜕𝑥𝜙 = 0

𝑎2𝜕𝑥𝜌 = −𝜆

2𝐷

𝜙 𝜙

𝜌

𝑎2𝜕𝑥𝜌 = −𝜆

2𝐷

𝜙 𝜙

𝜌

Page 75: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

• Left: Fast Transients

– Flow in a single pipe with sinusoidal

variation (3 cycles over 1 hour) in outlet

flow with maximum magnitudes of 120,

300, 400, and 600 kg/s.

– The monotonicity theorem does not

apply for the fast transient regime

• Right: Slow Transients

– Flow in a single pipe with slow sinusoidal

variation (3 cycles in 24 hours) in outlet

flow with max magnitudes of 120, 300,

400, & 600 kg/s.

– The monotonicity theorem holds in the

slow transient regime

• Guidance: friction-dominated

modeling should not be used to

represent fast transients

Application: friction-dominated models

7/22/2020 | 75Los Alamos National Laboratory

• Misra, Sidhant, Marc Vuffray, and Anatoly Zlotnik. "Monotonicity Properties of Physical Network Flows and Application to

Robust Optimal Allocation." Proceedings of the IEEE (to appear), arXiv:2007.10271.

Page 76: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

• Testing the monotonicity property in the normal operating regime of gas pipelines

– Top left: Baseline withdrawals (kg/s) custody transfer stations.

– Top right: Increase of withdrawals above baseline by 5%.

– Bottom left: Simulated pressure (PSI) solutions given baseline withdrawals.

– Bottom right: Simulated pressure solutions given increased withdrawals.

• Monotonicity property can be invoked in practice for transient optimization

Application: real data validation

7/22/2020 | 76Los Alamos National Laboratory

• Misra, Sidhant, Marc Vuffray, and Anatoly Zlotnik. "Monotonicity Properties of Physical Network Flows and Application to

Robust Optimal Allocation." Proceedings of the IEEE (to appear), arXiv:2007.10271.

Page 77: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Coordination of electricity and gas transmission

7/21/2020 | 77Los Alamos National Laboratory

Page 78: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Initial study on benefits of joint optimization

7/21/2020 | 78Los Alamos National Laboratory

• Joint optimization problem

– Simple model of real-time load balancing by a optimal power flow

– Combined with transient optimization of gas flows

• Coordination scenarios

– 1: Status quo systems and markets

– 2: Predictive dynamic gas flow control

– 3: Joint optimization with status quo methods (steady-state\static gas system settings)

– 4: Joint optimization with dynamic gas flow control

• System stress cases

– Base case (regular operations)

– Stress case (systems at capacity)

• Zlotnik, Anatoly, Line Roald, Scott Backhaus, Michael Chertkov, and Göran Andersson. "Coordinated scheduling for

interdependent electric power and natural gas infrastructures." IEEE Transactions on Power Systems 32, no. 1 (2017): 600-610.

Page 79: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Initial study on benefits of joint optimization

7/21/2020 | 79Los Alamos National Laboratory

• Joint optimization problem

– Simple model of

real-time load

balancing by OPF

– Transient optimization

of gas flows

– Coupled through

heat rate curve of

gas-fired generators

• Zlotnik, Anatoly, Line Roald, Scott Backhaus, Michael Chertkov, and Göran Andersson. "Coordinated scheduling for

interdependent electric power and natural gas infrastructures." IEEE Transactions on Power Systems 32, no. 1 (2017): 600-610.

Page 80: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Initial study on benefits of co-optimization

7/21/2020 | 80Los Alamos National Laboratory

Power system model

Dynamic constraints

on gas availability

Gas pipeline network model

• Simple model

– Fixed gas price $/mmBTU,

– Quadratic heat rate curves,

– Quadratic generation cost curves

Page 81: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Initial study on benefits of co-optimization

7/21/2020 | 81Los Alamos National Laboratory

Page 82: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Initial study on benefits of co-optimization

7/21/2020 | 82Los Alamos National Laboratory

Page 83: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Initial study on benefits of co-optimization

7/21/2020 | 83Los Alamos National Laboratory

Page 84: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

A realistic coordination mechanism

7/21/2020 | 84Los Alamos National Laboratory

• Realistic coordination between sectors

– A gas balancing market using rolling horizon model-predictive optimal control

– Fits into decision cycles for day-ahead scheduling of electricity and gas systems

Page 85: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Evaluating the coordination concept

7/21/2020 | 85Los Alamos National Laboratory

• Optimization model for power system

– Standard Unit Commitment (UC) for day-ahead market

– Mixed Integer Linear Program, control variables are generator production

– Objective function is minimum production cost

– Constraints on power system and generators

• Optimization model for gas system

– Optimal control of flows on a network, control variables are compressors & demands

– Objective function is maximizing economic welfare for system users

– Dynamic constraints are PDEs on network edges, Kirchoff’s law on nodes

– Inequality constraints on states and controls

• Iterative coordination mechanism between two models

– Limited to exchange of generation/flow and price time-series (not network models)

Page 86: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Evaluating the coordination concept

7/21/2020 | 86Los Alamos National Laboratory

Power

System

(Unit

Commitment)

Gas

System

(Gas

Balancing

Market)

Generator

(Heat

Rate

Curve)

• A study to test the mechanism:

Page 87: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Evaluating the coordination concept

7/21/2020 | 87Los Alamos National Laboratory

Power

System

(Unit

Commitment)

Gas

System

(Gas

Balancing

Market)

Generator

(Heat

Rate

Curve)

Optimal Production

Schedule 𝑝𝑖(𝑡)

Locational Marginal

Prices 𝜆𝑖𝑝(𝑡)

• A study to test the mechanism:

𝑑𝑖max(𝑡): Maximum gas

demand of generators

Bid (buy) price 𝑐𝑖𝑔(𝑡)

for gas

𝑑𝑖max = ℎ1(𝑝𝑖)

𝑐𝑖𝑔= ℎ2(𝜆𝑖

𝑝)

Page 88: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Evaluating the coordination concept

7/21/2020 | 88Los Alamos National Laboratory

Power

System

(Unit

Commitment)

Gas

System

(Gas

Balancing

Market)

Generator

(Heat

Rate

Curve)

Optimal Production

Schedule 𝑝𝑖(𝑡)

Locational Marginal

Prices 𝜆𝑖𝑝(𝑡)

• A study to test the mechanism:

𝑑𝑖max(𝑡): Maximum gas

demand of generators

Bid (buy) price 𝑐𝑖𝑔(𝑡)

for gas

𝑝𝑖max(𝑡): Maximum

Production Schedule

Optimal gas delivery

to power generators

𝑑𝑖(𝑡) ≤ 𝑑𝑖max(𝑡)

Locational Trade

Values of gas 𝜆𝑖𝑔(𝑡)

𝑐𝑖𝑝(𝑡): Marginal price

of generation (of fuel)

𝑑𝑖max = ℎ1(𝑝𝑖)

𝑐𝑖𝑔= ℎ2(𝜆𝑖

𝑝)

𝑝𝑖 = ℎ1−1(𝑑𝑖

max)

𝑐𝑖𝑝= ℎ2

−1(𝜆𝑖𝑔)

• Zhao, Bining, Anatoly Zlotnik, Antonio J. Conejo, Ramteen Sioshansi, and Aleksandr M. Rudkevich. "Shadow Price-Based

Coordination of Natural Gas and Electric Power Systems." IEEE Transactions on Power Systems (2018).

Page 89: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Computational Example

7/21/2020 | 89Los Alamos National Laboratory

24 pipe gas test network 24 node IEEE RTS power network System power demand profile

• Procedure converges after 1

iteration!

Page 90: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Computational Example

7/21/2020 | 90Los Alamos National Laboratory

Generation Schedule:

1 hour increments

Generation Schedule:

15 minute increments

Hourly electricity price

Initial Iteration

Final iteration

• Gas generators have lowest

marginal costs

• Production is transferred to

other sources

Page 91: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Path to gas-electric system interoperability

7/21/2020 | 91Los Alamos National Laboratory

• Gas-electric coordination using optimization-based markets

– Time-dependent locational marginal pricing (electricity LMPs and natural gas LTVs)

– Requires only limited exchange of information to produce price/quantity (P/Q) bids and

production/demand constraints

• Properties

– Revenue adequacy for the administrators of both markets

– Operation of systems is not altered if all demands can be met

– Convergence after only one iteration of the procedure (by ~linearity of UC)

• Zhao, Bining, Anatoly Zlotnik, Antonio J. Conejo, Ramteen Sioshansi, and Aleksandr M. Rudkevich. "Shadow Price-Based

Coordination of Natural Gas and Electric Power Systems." IEEE Transactions on Power Systems (2018).

Page 92: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Transition to practice

7/22/2020 | 92Los Alamos National Laboratory

Commercial ENELYTIX system

Power System Optimizer (PSO) by Polaris (CPLEX).

Gas System Optimizer (GSO) by LANL (IPOPT).

Scalable and flexible cloud-based architecture.

Coordinated Operation of Electric And Natural Gas Supply

Networks: Optimization Processes And Market Design

• Zlotnik, Anatoly, Sundar, Kaarthik, Rudkevich, Alexandr. M., Tabors, Richard, & Li, Xindi. "Pipeline Transient Optimization for

a Gas-Electric Coordination Decision Support System." PSIG Annual Meeting. Pipeline Simulation Interest Group, 2019.

Fuel Reliability for Electric Energy Delivery by Optimized

Management of Gas-pipeline Automation Systems (FREEDOM GAS)

Software development, system integration, and pilot study

Page 93: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Acknowledgement

7/22/2020 | 93Los Alamos National Laboratory

• ARPA-e Project GECO

– Advanced Research Project Agency-Energy (ARPA-e) of the

U.S. Department of Energy, Award No. DE-AR0000673

• Kinder Morgan, PJM

• Advanced Grid Modeling Program

– D.O.E. Office of Electricity

– D.O.E. Office of Energy Efficiency and Renewable Energy

• Los Alamos National Laboratory

– National Nuclear Security Administration

of the U.S. Department of Energy

under Contract No. 89233218CNA000001

• GRAIL: Gas Reliability Analysis Integrated Library

– Open source LANL-developed prototype algorithms

https://github.com/lanl-ansi/grail (OSTI ID 18546)

Page 94: Practical Mathematical Modeling for Simulation, Estimation ... · 7/22/2020  · Practical Mathematical Modeling for Simulation, Estimation, and Optimal Control of Gas Pipeline Systems

Questions?

[email protected]