Bayesian inference of impurity transport coefficient profiles M.A. Chilenski,, M. Greenwald, Y. Marzouk, J.E. Rice, A.E. White Systems and Technology Research MIT Plasma Science and Fusion Center/Alcator C-Mod MIT Aero/Astro, Uncertainty Quantification Group May, 7 This material is based upon work conducted using the Alcator C-Mod tokamak, a DOE Office of Science user facility. This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Fusion Energy Sciences under Award Number DE-FC-99ER55. This material is based upon work supported in part by the U.S. Department of Energy Office of Science Graduate Research Fellowship Program (DOE SCGF), made possible in part by the American Recovery and Reinvestment Act of 9, administered by ORISE-ORAU under contract number DE-AC5-6OR. The XEUS and LoWEUS spectrometers were developed at the LLNL EBIT lab. Work at LLNL was performed under the auspices of the US DOE under contract DE-AC5-7NA-7. Some of the computations using STRAHL were carried out on the MIT PSFC parallel AMD Opteron/Infiniband cluster Loki. /9
Bayesian inference of impurity transport coefficient profiles Background, issues with existing approaches Linearized model to verify diagnostic sufficiency Inferring transport coefficient profiles with multimodal nested sampling /9
Bayesian inference of impurity transport coefficient profiles Background, issues with existing approaches Linearized model to verify diagnostic sufficiency Inferring transport coefficient profiles with multimodal nested sampling /9
Measuring impurity transport and testing simulations: making sure we know what we think we know Impurity transport coefficients D, V are often used in validation metrics n Z t = Γ Z + Q Z Model impurity flux Γ Z with diffusion coefficient D, convective velocity V: Γ Z = D n Z + Vn Z D, V are often used to validate impurity transport simulations: Important to measure D, V properly to have a strong test of the code. /9
Measuring impurity transport and testing simulations: making sure we know what we think we know Γ Z = D n Z + Vn Z Current approaches for measuring D, V have considerable shortcomings Error bars not consistent with intuition. Different starting points give different results: Multiple solutions? Broad region of acceptable solutions? New approach fixes these issues Verify diagnostic sufficiency with linearized model. Use advanced inference techniques to find D(r), V(r). Key result: rigorous selection of level of complexity in D(r), V(r) is critical. 5/9
Inferring impurity transport coefficients: a nonlinear inverse problem transport coefficient profiles D, V forward model STRAHL The rest of this talk: observed spectrometer signals modeled s(r, t) spectrometer signals s(r, t) Are our diagnostics sufficient? f (D, V s) probability model How to infer D, V with rigorous uncertainty estimates? Inject impurity with laser blow-off Can only observe s, want to know D, V. Only know the forward mapping s = m(d, V), but want D, V = m (s). Key questions: Existence: Is there a D, V such that s s? Uniqueness: How many D, V are there such that s s? Stability: How much do D, V change when I perturb s? 6/9
Bayesian inference of impurity transport coefficient profiles Background, issues with existing approaches Linearized model to verify diagnostic sufficiency Inferring transport coefficient profiles with multimodal nested sampling 7/9
A simple model to verify diagnostic sufficiency..5..5. 6 8 Basic D, V profiles....6.8. r/a n Z [ m ] n Z [ m ] Temporal evolution of n Z 5 r/a =.5 8 t t inj [ms] Spatial evolution of n Z 8 6....6.8. r/a 6 8 Simple D, V profiles yield representative signals. Three figures of merit capture most of the information: t t inj [ms] Confinement time τ imp Rise time t r Profile broadness b r/a = n Z (r/a)/n Z () 8/9
Intersection of the contours of τ imp, t r and b.75 determines D, V 8. Intersection of τ imp, t r and b.75 8.5 9. 9.5..5 true..5..8.85.9.95..5..5 9/9
Intersection of the contours of τ imp, t r and b.75 determines D, V 8. 8.5 9. 9.5..5 broadness b.75 Intersection of τ imp, t r and b.75 confinement time τ imp core rise time t r true..5..8.85.9.95..5..5 9/9
Intersection of the contours of τ imp, t r and b.75 determines D, V 8. 8.5 9. 9.5..5 broadness b.75 Intersection of τ imp, t r and b.75 confinement time τ imp core rise time t r true..5..8.85.9.95..5..5 9/9
Intersection of the contours of τ imp, t r and b.75 determines D, V 8. 8.5 9. 9.5..5. broadness b.75 Intersection of τ imp, t r and b.75 confinement time τ imp core rise time t r true 95% region.5..8.85.9.95..5..5 9/9
Making the picture quantitative Linearize each figure of merit y i = g i (D, V) with respect to D, V. Assume Gaussian noise: y i N (μ yi, σ y i ). Transport coefficient vector T = [D, V] T N (μ T y, Σ T y ): μ T y = (C T Σ y C) (C T Σ y (y a)) Σ T y = (C T Σ y C) μ T y is the actual prediction of T = [D, V] T, Σ T y contains the uncertainties. a and C come from the linearization. y contains the actual observations, Σ y contains the uncertainties. This is exactly the result of weighted least squares regression: the analysis attempts to match the observations in the least squares sense. /9
Alcator C-Mod s diagnostics should be sufficient to reconstruct D, V rel. noise u rel. noise u Uncertainty in V point points 5 points time res. Δt [s] points HiReX-SR VUV time res. Δt [s] 5..5..5 9. 7.5 6..5..5. σ Generated synthetic data, ran through linearized model. σ D /D < σ V / V : just need to focus on V. Dashed lines: contours of constant photon rate. Green contours: σ V /V = ±%. HiReX-SR imaging crystal spectrometer should readily obtain σ V /V < %. /9
Bayesian inference of impurity transport coefficient profiles Background, issues with existing approaches Linearized model to verify diagnostic sufficiency Inferring transport coefficient profiles with multimodal nested sampling /9
Inferring impurity transport coefficients: a nonlinear inverse problem inject impurity diffusion, convection move impurity observe signals Finding D, V with Bayesian inference f D,V s (D, V s) posterior distribution = prior likelihood: distribution from STRAHL + data (D >, V() =, etc.) f s D,V (s D, V) f s (s) evidence f D,V (D, V) Parameter estimation: Find D, V: characterize f D,V s (D, V s). f : probability density function s: measured signals Model selection: Find best way of parameterizing D, V: maximize f s (s). M: functional form (model) used to parameterize D(r), V(r). D, V: parameters describing radial profiles of diffusion, convection Use MultiNest [Feroz MNRAS 8, 9]: samples f D,V s (D, V s) and estimates f s (s). /9
Inferring impurity transport coefficients: a nonlinear inverse problem inject impurity diffusion, convection move impurity observe signals Finding D, V with Bayesian inference f D,V s,m (D, V s, M) posterior distribution likelihood: from STRAHL + data prior distribution (D >, V() =, etc.) f s D,V,M (s D, V, M) f D,V M (D, V M) = f s M (s M) evidence Parameter estimation: Find D, V: characterize f D,V s,m (D, V s, M). f : probability density function s: measured signals D, V: parameters describing radial profiles of diffusion, convection Model selection: Find best way of parameterizing D, V: maximize f s M (s M). M: functional form (model) used to parameterize D(r), V(r). Use MultiNest [Feroz MNRAS 8, 9]: samples f D,V s,m (D, V s, M) and estimates f s M (s M). /9
MultiNest successfully reconstructs simple D, V profiles..5..5 True and inferred D, V. true 6 inferred 8....6.8. r/a Five local measurements Δt = 6 ms, 5% noise Have also tested with HiReX-SR chords (synthetic data) 5 smaller σ D, σ V than linearized analysis, but same correlation f D,V y (D, V y) 9.6...99.5... 9.6 /9
MultiNest successfully reconstructs simple D, V profiles..5..5 True and inferred D, V. true 6 inferred 8....6.8. r/a Five local measurements Δt = 6 ms, 5% noise Have also tested with HiReX-SR chords (synthetic data) 5 smaller σ D, σ V than linearized analysis, but same correlation f D,V y (D, V y) 9.6...99.5... 9.6 /9
MultiNest successfully determines how many spline coefficients to use D, V for various levels of complexity..5..5. 6 8....6.8. r/a MultiNest estimates the evidence f s c (s c): probability of observing the data given c. Ran with various numbers of free parameters: correctly selected c = case. Bayes factors: BF(c, ) = f s c (s c)/f s (s ) BF(c, ) Probability relative to c = case 6 coefficients per profile, c 5/9
Testing with more complicated synthetic data More complicated D, V profiles 7 6 5 5 5 5 5....6.8. r/a Need to test with data representative of reality. Used result from [Howard NF, Chilenski NF 5] as true profile. Realistic diagnostic configuration: x-ray spectrometer chords (Ca 8+ ), 6 ms time resolution, 5% noise VUV spectrometer chords (Ca 7+, Ca 6+ ), ms time resolution, 5% noise 6/9
More complicated synthetic data pose a challenge BF(c, 5) 56 BF(c, 5) Relative probabilities Full c < too small to compute 5 6 7 Zoomed 5 6 7 coefficients per profile, c evaluations Model selection is expensive 8 7 6 5 5 6 7 coefficients per profile, c 7 coefficient case took 7 CPU-hours = 5 wall-clock days! Need to speed up model, deploy on cluster to make this practical. (Recall: BF(c, 5) = f s c (s c)/f s 5 (s 5)) 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5....6.8. r/a 8/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 (too small to see) 6 true 5....6.8. r/a 8/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5....6.8. r/a 8/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 7 6 true 5....6.8. r/a 8/9
Getting D, V right requires careful statistical analysis Conclusions Need to select right level of complexity: Can appear to match data well while not matching the real D and V at all. New approach rigorously selects the most likely model. Can also estimate/verify diagnostic requirements. Validation of impurity transport simulations is still an open question, but we have a path forward. Additional details are in my PhD thesis: markchil.github.io/pdfs/thesis.pdf Open-source software: github.com/markchil/bayesimp 9/9
Backup slides /9
Inferring impurity transport coefficients is a difficult inverse problem D(r, [t]) V(r, [t]) spectroscopic observations XICS/VUV: s = (r, t) dl probability model f s D,V (s D, V) Ca source STRAHL n Z,i (r, t) s = (r, t) dl n e (r, [t]) T e (r, [t]) forward model PEC: P ij (T e, n e ) view geometry /9
Spectrometer chords on Alcator C-Mod Spectrometer lines of sight Z [m].6......6..6.8. R [m] HiReX-SR X-ray imaging crystal spectrometer (XICS) with chords split into 8 groups. Views He-like Ca (. nm) with 6 ms time resolution. XEUS Vacuum ultraviolet (VUV) spectrometer with one chord. Views Li-like Ca (.9 nm) with ms time resolution. LoWEUS Vacuum ultraviolet (VUV) spectrometer with one chord. Views Be-like Ca (9 nm) with ms time resolution. /9
Model selection using the evidence (a.k.a. the marginal likelihood) evidence f s (s) likelihood prior f s D,V (s D, V) f D,V (D, V) f D,V s (D, V s) = f s (s) posterior evidence f s (s) = f s D,V (s D, V)f D,V (D, V) dd dv.6 simple.5. observation... moderate complex. 6 8 data s Tradeoff between goodness of fit, complexity [Schwarz AS 978]: ln f s (s) ln f s θ (s θ) goodness-of-fit d ln N complexity (d is number of parameters, N number of datapoints) f s (s) is maximized by model with right level of complexity. Simple models can only explain a few data sets, low evidence for most s. Complex models can explain many data sets, any given s has low probability. /9
Simple example: fitting noisy data from y = x + x 5x + y y true y 8 5 Cubic data, polynomial fits 5 not clear which fit to prefer based on residuals alone... Residuals 5 Zoomed x BF(d, ) BF(d, ) 9 8..8.6.. Relative probability linear fit strongly rejected cubic fit correctly selected 5 polynomial degree, d /9
More complex models match the true profiles better Mahalanobis distance: M = (T true μ) T Σ (T true μ), T = [D, V] Mahalanobis distance 7 6 5 Distance from true profile 5 6 7 coefficients per profile, c 5/9
V/D is captured for r/a.7, c 5 V/D [m ] c = 5 6 7 Impurity peaking factor....6.8. r/a 6/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 (too small to see) 6 true 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 5 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 6 true 6 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 7 6 true 5....6.8. r/a 7/9
Results only resemble true profile when a minimum level of complexity is obtained despite good match to data: eyeballing does not work! Relative probabilities: BF(c, 5) c < too small to compute 56 5 6 7.8.. 5 6 7 coefficients per profile, c. Core signal [AU] Edge signal [AU] 8 t t inj [ms] shaded region: ±σ 8 7 6 true 5 6 5....6.8. r/a 7/9
Rate coefficients have low sensitivity to n e, T e over their uncertainties α i i [m /s] S i i [m /s] 6 7 8 9 Recombination Ionization 5 6 7 8 9....6.8. r/a 8 6 8 6 i samples from n e, T e ±σ band on α, S not even visible! These are the only ways that n e, T e enter the calculation. P ij [ 8 m /s] Photon emission..5..5..5..5.....6.8. r/a 8/9
GPR permits efficient propagation of uncertainty [Chilenski NF 5] Drawing samples of the profile y: λ / [ m ] λ / [kev] y N (μ, Σ), Σ = QΛQ y = QΛ / u + μ, u N (, I) 5 6 7 5 n e T e 7 6 6 8 eigenvalue index λ / q [ m ] λ / q [kev].5..5..5..5.........5.6 n e, T e eigenvectors n e T e....6.8.. r/a 9/9
D D D D 5 V V..75.8..6..8. V V V 5 5 6. 5.6 5 f D,V s (D, V s), c = 5.5. D.75. D..8 D..6 D..8 D 5 V V 5 V 5.6 6. V 5 V 5 /9
D D D D 5 D 6 D 7 V V V V V 5 V 6 V 7.. 5.5...6.9.6 6..5 6 7.5 5. 5 f D,V s (D, V s), c = 7.. 5..5.6..6.9 6.5. 6 5. 7.5 5 D D D D V D 5 D D 7 V V 6 V V 5 V 6 V 7 /9