Cookbook: How to Compare Models to Data

advertisement
10.34, Numerical Mehods Applied to Chemical Engineering
Professor William H. Green
Lecture #24: Uncertainties in model predictions.
Cookbook: How to Compare Models to Data
1) Model definition: Understand your model
2) Assess what you already knew before adjusting any parameters
3) Adjust parameters to find a choice θ that makes data and model consistent
4) Refine parameters using the data (actually refine error bars on θ)
Model Definition
1) Write some equations
numerical error in solving
Implicit
Ymodel(xi, θ, q)
Explicit Algebra
parameters not to be adjusted
 ∂Ymax/∂θn
Sensitivity Analysis d/dθ
2) Where do the numbers in model come from? Error bars?
3) Approximations, Assumptions
Equations
4) Look for built in dependencies between θ’s
(may not be able to separately determine each one)
Reformulate model to depend on
~
θ
Assess what you already know.
May already have p(θ) from previous results
σi  explicit uncertainties
±δx
initial guess of θ for nonlinear least squares χ2(θguess)
±∂qm
Adjusting Parameters
minθ χ2(θ)
such that θn,min < θn < θn,max
Linear Model:
Ymodel,i = Ymodel(xi) = ΣnθnFn(xi)
χ2(θ) =
N data
∑
i =1
⎛ Yi data − Yi mod el
⎜
⎜
σ i2
⎝
⎞
⎟
⎟
⎠
Ain ≡
Fn ( x i )
σi
bi ≡
Yi data
σi
χ2 = ||A·θ – b||2
∂χ 2
=0
∂θ
(ATA)θ = ATb
Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical Engineering, Fall
2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD
Month YYYY].
usually ill-conditioned
SVD
A = U Λ VT
⎛ ui ⋅b ⎞
v
v
⎟⎟v i ± 1 ± 2 ± ...
λ1 λ2
i =1 ⎝ λi
⎠
N data
θbest =
∑ ⎜⎜
σ2(θj) = Σ(vji/λi)2
covariance(θj,θk) = Σ(vjivki/λi2)
When minimizing, consider Hessian:
∂ 2 (χ 2 )
=
dθ m dθ n
N data
∑
i =1
1 ∂Ymod el ,i ∂Ymod el ,i N data ⎛⎜ Yi data − Yi mod el
+ ∑⎜
∂θ n
σ i2 ∂θ m
σ i2
i =1 ⎝
⎞ ∂ 2Ymod el ,i
⎟
⎟ ∂θ ∂θ
m
n
⎠
Usually just noise (2nd derivative)
χ2 = χ2(θbest) + ½(θ – θbest) HT(θ – θbest)
~ ) + λ (v~ ) ]
½[ λ1 (v
1
2
2
2
2
θ2
θ1
Figure 1. Two parameter fitting.
10.34, Numerical Methods Applied to Chemical Engineering
Prof. William Green
Lecture 24
Page 2 of 2
Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical Engineering, Fall
2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD
Month YYYY].
Download