Predictive Data Science for physical systems
From model reduction to scientific machine learning
Professor Karen E. Willcox Mathematics of Reduced Order Models | ICERM | 2-20-202
1
Predictive Data Science for physical systems From model reduction - - PowerPoint PPT Presentation
Predictive Data Science for physical systems From model reduction to scientific machine learning Professor Karen E. Willcox Mathematics of Reduced Order Models | ICERM | 2-20-20 2 1 The Team Funding sources: US Air Force Computational
Professor Karen E. Willcox Mathematics of Reduced Order Models | ICERM | 2-20-202
1
Funding sources:
Math Program (F. Fahroo)
Excellence on Rocket Combustion (M. Birkan, F. Fahroo, R. Munipalli, D. Talley)
AEOLUS MMICC (S. Lee,
Design Centre
Khodabakhshi Oden Institute
Peherstorfer Courant Institute
UCSD Renee Swischuk Caliper Elizabeth Qian MIT Michael Kapteyn MIT
2
Scientific Machine Learning What, Why & How?
Lift & Learn Projection-based model reduction as a lens through which to learn predictive models
Conclusions & Outlook
3
“Scientific machine learning (SciML) is a core component of artificial intelligence (AI) and a computational technology that can be trained, with scientific data, to augment or automate human skills. Across the Department of Energy (DOE), SciML has the potential to transform science and energy research. Breakthroughs and major progress will be enabled by harnessing DOE investments in massive data from scientific user facilities, software for predictive models and algorithms, high-performance computing platforms, and the national workforce.”
4
Respect physical constraints Embed domain knowledge Bring interpretability to results Integrate heterogeneous, noisy & incomplete data Get predictions with quantified uncertainties
5
Of Offline: fline: Online: Online:
Use model library to train a classifier that predicts asset state based on sensor data Construct library of ROMs representing different asset states
sensor data
Analysis Prediction Optimization
updated Digital Twin current Digital Twin
[Kapteyn, Knezevic, W. AIAA Scitech 2020]
Machine learning
“The scientific study of algorithms & statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns & inference instead.” [Wikipedia]
Reduced-order modeling
“Model order reduction (MOR) is a technique for reducing the computational complexity of mathematical models in numerical simulations.” [Wikipedia] Model reduction methods have grown from Computational Science & Engineering, with focus on reducing high-dimensional models that arise from physics-based modeling, whereas machine learning has grown from Computer Science, with a focus on creating low-dimensional models from black-box data streams. [Swischuk et al., Computers & Fluids, 2019]
7
Machine learning
“The scientific study of algorithms & statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns & inference instead.” [Wikipedia]
Reduced-order modeling
“Model order reduction (MOR) is a technique for reducing the computational complexity of mathematical models in numerical simulations.” [Wikipedia]
Discover hidden structure Non-intrusive implementation Black-box & flexible Accessible & available Embed governing equations Structure-preserving Predictive (error estimators) Stability-preserving
8
Projection-based model reduction as a lens through which to learn low-dimensional predictive models 1 Scientific Machine Learning 2 Lift & Learn 3 Conclusions & Outlook
9
P, kPa T, K Q, MW/m3 YCH4
𝑦
Temperature Order parameter
Rocket combustion Solidification process in additive manufacturing
Typically described by a set of PDEs or ODEs
low-dimensional model
polynomial structure in the model → can be exploited with non-intrusive learning
10
Discretize: Spatially discretized finite element model discretized state 𝐲 contains temperature and phase field
𝑂𝑨 spatial grid points
𝐲 = 𝑈
1
⋮ 𝑈𝑂𝑨 𝜚1 ⋮ 𝜚𝑂𝑨
ሶ 𝐲 = 𝐁𝐲 + 𝐂𝐯 + 𝐠(𝐲, 𝐯)
𝑂𝑨~𝑃(103 − 109)
Figure from: https://www.bintoa.com/powder-bed-fusion/
Example: modeling solidification in additive manufacturing Space/time evolution of temperature 𝑈 and phase parameter 𝜚
with
Model based on Kobayashi, 1993; collaboration with Bao & Biros
11
dimension 103 − 109 solution time ~minutes / hours dimension 101 − 103 solution time ~seconds / minutes
12
high-fidelity physics-based simulation reduced-order model
Full-order model (FOM) state 𝐲 ∈ ℝ𝑂 Reduced-order model (ROM) state 𝐲𝑠 ∈ ℝ𝑠 ሶ 𝐲 = 𝐁𝐲 + 𝐂𝐯 Approximate 𝐲 ≈ 𝐖𝐲𝑠 𝑊 ∈ ℝ𝑂×𝑠 𝐬 = 𝐖 ሶ 𝐲𝑠 − 𝐁𝐖𝐲𝑠 − 𝐂𝐯 Project 𝐗⊤𝐬 = 0 (Galerkin: 𝐗 = 𝐖) Residual: 𝑶 eqs ≫ 𝒔 dof ሶ 𝐲𝑠 = 𝐁𝑠𝐲𝑠 + 𝐂𝑠𝐯 𝐁𝑠 = 𝐖⊤𝐁𝐖 𝐂𝑠 = 𝐖⊤𝐂
13
14
FOM: ROM: ROM: FOM: Precompute the ROM matrices: Precompute the ROM matrices and tensor:
ሶ 𝐲𝑠 = 𝐁𝑠𝐲𝑠 + 𝐂𝑠𝐯 ሶ 𝐲𝑠 = 𝐁𝑠𝐲𝑠 + 𝐈𝑠 𝐲𝑠 ⊗ 𝐲𝑠 + 𝐂𝑠𝐯 ሶ 𝐲 = 𝐁𝐲 + 𝐈 𝐲 ⊗ 𝐲 + 𝐂𝐯 ሶ 𝐲 = 𝐁𝐲 + 𝐂𝐯 projection preserves structure ↔ structure embeds physical constraints 𝐁𝑠 = 𝐖⊤𝐁𝐖, 𝐂𝑠 = 𝐖⊤𝐂 𝐈𝑠 = 𝐖⊤𝐈(𝐖 ⊗ 𝐖)
Operator Inference
using proper orthogonal decomposition (POD) aka PCA
Peherstorfer & W. Data-driven operator inference for nonintrusive projection-based model reduction, Computer Methods in Applied Mechanics and Engineering, 2016
𝐘 = | | ො 𝐲(𝑢1) … ො 𝐲(𝑢𝐿) | | ሶ 𝐘 = | | ሶ ො 𝐲(𝑢1) … ሶ ො 𝐲(𝑢𝐿) | | Given reduced state data ( 𝐘) and derivative data ( ሶ 𝐘): Find the operators 𝐁, 𝐂, 𝐈 by solving the least squares problem:
𝐁, 𝐂, 𝐈
⊤
𝐘 data by projection of 𝐘 snapshot data
the intrusive POD reduced model [Peherstorfer, 2019]
16
𝜖 𝜖𝑢 𝜍 𝜍𝑣 𝐹 + 𝜖 𝜖𝑦 𝜍𝑣 𝜍𝑣2 + 𝑞 𝐹 + 𝑞 𝑣 = 0 𝐹 = 𝑞 𝛿 − 1 + 1 2 𝜍𝑣2 𝜖 𝜖𝑢 𝜍 𝑣 𝑞 + 𝜍 𝜖𝑣 𝜖𝑦 + 𝑣 𝜖𝜍 𝜖𝑦 𝑣 𝜖𝑣 𝜖𝑦 + 1 𝜍 𝜖𝑞 𝜖𝑦 𝛿𝑞 𝜖𝑣 𝜖𝑦 + 𝑣 𝜖𝑞 𝜖𝑦 = 0 𝜖 𝜖𝑢 𝑣 𝑞 𝑟 + 𝑣 𝜖𝑣 𝜖𝑦 + 𝑟 𝜖𝑞 𝜖𝑦 𝛿𝑞 𝜖𝑣 𝜖𝑦 + 𝑣 𝜖𝑞 𝜖𝑦 𝑟 𝜖𝑣 𝜖𝑦 + 𝑣 𝜖𝑟 𝜖𝑦 = 0
1 𝜍
𝜖𝑟 𝜖𝑢 = −1 𝜍2 𝜖𝜍 𝜖𝑢 = −1 𝜍2 −𝜍 𝜖𝑣 𝜖𝑨 − 𝑣 𝜖𝜍 𝜖𝑨
= 𝑟
𝜖𝑣 𝜖𝑨 − 𝑣 𝜖𝑟 𝜖𝑨
𝜖 𝜖𝑢 𝑥 𝑞 𝑟 + 𝑥 𝜖𝑥 𝜖𝑨 + 𝑟 𝜖𝑞 𝜖𝑨 𝛿𝑞 𝜖𝑥 𝜖𝑨 + 𝑥 𝜖𝑞 𝜖𝑨 𝑟 𝜖𝑥 𝜖𝑨 + 𝑥 𝜖𝑟 𝜖𝑨 = 0 specific volume variables
transformed system has quadratic structure
𝜖 𝜖𝑢 𝜍 𝜍𝑥 𝐹 + 𝜖 𝜖𝑨 𝜍𝑥 𝜍𝑥2 + 𝑞 𝐹 + 𝑞 𝑥 = 0 𝐹 = 𝑞 𝛿 − 1 + 1 2 𝜍𝑥2
𝜖 𝜖𝑢 𝜍 𝑥 𝑞 + 𝜍 𝜖𝑥 𝜖𝑨 + 𝑥 𝜖𝜍 𝜖𝑨 𝑥 𝜖𝑥 𝜖𝑨 + 1 𝜍 𝜖𝑞 𝜖𝑨 𝛿𝑞 𝜖𝑥 𝜖𝑨 + 𝑥 𝜖𝑞 𝜖𝑨 = 0
conservative variables mass, momentum, energy primitive variables mass, velocity, pressure
ሶ 𝐲𝑠 = 𝐈𝑠 𝐲𝑠 ⊗ 𝐲𝑠 + 𝐂𝑠𝐯 ሶ 𝐲 = 𝐈 𝐲 ⊗ 𝐲 + 𝐂𝐯
ROM has quadratic structure
18
dimension 𝑒𝑡
dimension 𝑒𝑥
quadratic form
19
[McCormick 1976; Gu 2011]
[Qian, Kramer, Peherstorfer, W. Physica D, 2020]
Example: Lifting a quartic ODE to quadratic-bilinear form Can either lift to a system of ODEs or to a system of DAEs
20
Consider the quartic system Introduce auxiliary variables: Chain rule: Need additional variable to make auxiliary dynamics quadratic:
QB-ODE QB-DAE
[McCormick 1976; Gu 2011]
cubic lifted equations
[Khodabakhshi, W. In preparation.]
22
with
DebRoy et al. Progress in Materials Science, 2018
Nonlinear system for 1D solidification
𝑈 𝜚
23
Chain rule: with Nonlinear system for 1D solidification
𝑈 𝜚
24
Chain rule: with Nonlinear system for 1D solidification
𝑈 𝜚 𝐿
25
Chain rule: with Nonlinear system for 1D solidification
𝑈 𝜚 𝐿 𝑞
26
Chain rule: with Nonlinear system for 1D solidification
𝑈 𝜚 𝐿 𝑞 𝑞′
27
Chain rule: Nonlinear system for 1D solidification
𝑈 𝜚 𝐿 𝑞 𝑞′ 𝑞′′
28
Original system:
Quadratic Quadratic Quadratic Cubic Cubic Cubic Cubic Cubic
with lifted variables 𝑈, 𝜚, 𝐿, 𝑞, 𝑞′, 𝑞′′, 𝑛0, 𝑧 with original variables 𝑈, 𝜚
Nonlinear system for 1D solidification
Using only snapshot data from the
model (non-intrusive) but using variable transformations to expose and exploit structure
𝐘𝐩𝐬𝐣𝐡 = | | 𝐲(𝑢1) … 𝐲(𝑢𝐿) | | ሶ 𝐘𝐩𝐬𝐣𝐡 = | | ሶ 𝐲(𝑢1) … ሶ 𝐲(𝑢𝐿) | | Lift & Learn [Qian, Kramer, Peherstorfer & W., 2019] 1. Generate full state trajectories (snapshots) (from high-fidelity simulation)
30
Using only snapshot data from the
model (non-intrusive) but using variable transformations to expose and exploit structure
Lift & Learn [Qian, Kramer, Peherstorfer & W., 2019] 1. Generate full state trajectories (snapshots) (from high-fidelity simulation) 2. Transform snapshot data to get lifted snapshots (analyze the PDEs to expose system polynomial structure) 𝐘𝐩𝐬𝐣𝐡 ⟶ 𝐘 ሶ 𝐘𝐩𝐬𝐣𝐡 ⟶ ሶ 𝐘
31
Using only snapshot data from the
model (non-intrusive) but using variable transformations to expose and exploit structure
𝐘 = 𝐖 𝚻 𝐗⊤ Lift & Learn [Qian, Kramer, Peherstorfer & W., 2019] 1. Generate full state trajectories (snapshots) (from high-fidelity simulation) 2. Transform snapshot data to get lifted snapshots 3. Compute POD basis from lifted trajectories
32
Using only snapshot data from the
model (non-intrusive) but using variable transformations to expose and exploit structure
𝐘 = 𝐖⊤𝐘 Lift & Learn [Qian, Kramer, Peherstorfer & W., 2019] 1. Generate full state trajectories (snapshots) (from high-fidelity simulation) 2. Transform snapshot data to get lifted snapshots 3. Compute POD basis from lifted trajectories 4. Project lifted trajectories onto POD basis, to
coordinate space
33
Using only snapshot data from the
model (non-intrusive) but using variable transformations to expose and exploit structure
𝐁, 𝐂, 𝐈
⊤
Lift & Learn [Qian, Kramer, Peherstorfer & W., 2019] 1. Generate full state trajectories (snapshots) (from high-fidelity simulation) 2. Transform snapshot data to get lifted snapshots 3. Compute POD basis from lifted trajectories 4. Project lifted trajectories onto POD basis, to
coordinate space 5. Solve least squares minimization problem to infer the low-dimensional model
34
Using only snapshot data from the
model (non-intrusive) but using variable transformations to expose and exploit structure
Lift & Learn [Qian, Kramer, Peherstorfer & W., 2019] 1. Generate full state trajectories (snapshots) (from high-fidelity simulation) 2. Transform snapshot data to get lifted snapshots 3. Compute POD basis from lifted trajectories 4. Project lifted trajectories onto POD basis, to
coordinate space 5. Solve least squares minimization problem to infer the low-dimensional model Under certain conditions, recovers the intrusive POD reduced model → convenience of black-box learning + rigor of projection-based reduction + structure imposed by physics
35
Lift & Learn reduced models for a highly nonlinear solidification process 1 Scientific Machine Learning 2 Lift & Learn 3 Conclusions & Outlook
36
https://www.bintoa.com/powder-bed-fusion
Training data
𝑈melt = 1.0, 𝑀 = 0.5, 𝛿 = 2.0, 𝐿0 = 1, 𝐿1 = 0.1
𝐲 = 𝑈, 𝜚, 𝐿, 𝑞, 𝑞′, 𝑞′′, 𝑛0, 𝑧
38
39
40
Lift & Learn reduced models for a complex Air Force combustion problem 1 Scientific Machine Learning 2 Lift & Learn 3 Conclusions & Outlook
kg s of 42% O2 / 58% H2O
kg s of CH4
Injector Element Injector Post Oxidizer Manifold Combustion Chamber Exit Throat
42
Training data
Air Force GEMS code (~200 hours CPU time)
𝐲 = 𝐪 𝐯 𝐰 𝟐/𝝇 𝝇𝐙𝐃𝐈𝟓 𝝇𝐙𝐏𝟑 𝝇𝐙𝐃𝐏𝟑 𝝇𝐙𝐈𝟑𝐏 makes many (but not all) terms in governing equations quadratic
Test data Additional 2 ms of data at four monitor locations (20,000 timesteps)
43
Pressure time traces at monitor location 1 Basis size 𝑠 = 24
44
Training Test
45
Pressure time traces at monitor location 1 Basis size 𝑠 = 29
Training Test
46
True Predicted
𝑠 = 29 POD modes
Relative error
Pressure Temperature
47
True Normalized absolute error
CH4 O2
Predicted
𝑠 = 29 POD modes
What future for model reduction? 1 Scientific Machine Learning 2 Lift & Learn 3 Conclusions & Outlook
Respect physical constraints Embed domain knowledge Bring interpretability to results Integrate heterogeneous, noisy & incomplete data Get predictions with quantified uncertainties
49
Respect physical constraints Embed domain knowledge Bring interpretability to results Integrate heterogeneous, noisy & incomplete data Get predictions with quantified uncertainties
50
issuing predictions with certified uncertainty for high-consequence applications
towards real-world scientific and engineering applications
accessible algorithms, community software, benchmark problems
depend on all of the above
51
building the mathematical foundations and computational methods to enable design of the next generation of engineered systems