Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00...
Transcript of Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00...
![Page 1: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/1.jpg)
Introduction of Computer-Aided Nano Engineering
Prof. Yan WangWoodruff School of Mechanical Engineering
Georgia Institute of TechnologyAtlanta, GA 30332, [email protected]
![Page 2: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/2.jpg)
Multiscale Systems Engineering Research Group
Topics
Computational Nano Engineering
Modeling & Simulation (M&S)
Approximations in M&S
![Page 3: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/3.jpg)
Multiscale Systems Engineering Research Group
Computational Nano-EngineeringExtensive applications of CAD/CAM/CAE software tools in traditional manufacturing lead to
Scalable processes
Cost effective and high-quality products with short time-to-market
Virtual Prototyping at nanoscalesComputer-Aided Nano-Design (CAND)
Computer-Aided Nano-Manufacturing (CANM)
Computer-Aided Nano-Engineering (CANE)
(a) CAD (b) CAE (c) CAPP/CAM (d) CAM
![Page 4: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/4.jpg)
Multiscale Systems Engineering Research Group
Computational Nano-EngineeringUse Modeling & Simulation tools to systematically resolve the issue of “lack of design” at nano scales.
Discover novel Nanostructures,
nanoparticles, and nanomaterials through investigator-initiated
exploratory research on a broad range of
materials
Determine nanomaterial
properties (chemical,
physical, and biological)
Identify potential
applications of value
Assess commercial
viability
Nanomaterials enter limited
markets
PAST: Discovery-Based Science and Product Development
Design, produce, and scale up nano-based materials with exact properties needed
(based on established understanding and
methods)
Start with existing needs, problems, or
challenges in end-use application
Large numbers of diverse products
based on Nanomaterials By
Design rapidly enter multiple
markets
FUTURE: Application-Based Problem Solving
![Page 5: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/5.jpg)
Multiscale Systems Engineering Research Group
How to study a systemSystem
Experiment with actual
system
Experiment with a model of actual system
Physical model
Mathematical model
Analytical solution
Simulation
![Page 6: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/6.jpg)
Multiscale Systems Engineering Research Group
What is Modeling?
![Page 7: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/7.jpg)
Multiscale Systems Engineering Research Group
Why mathematical modeling?
Advantages
Disadvantages
![Page 8: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/8.jpg)
Multiscale Systems Engineering Research Group
An example of modeling
Free fall model
![Page 9: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/9.jpg)
Multiscale Systems Engineering Research Group
Mathematical model
Dependent variable=f(Independent variable)
High dimensional
Parametric systems
“Noisy” systems
( )y f x=
( )1 2, , ...y f x x=
( )1 2( ), ( ), , ( ),
ny f x u x u x u u= …
( ),y f x= γ
![Page 10: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/10.jpg)
Multiscale Systems Engineering Research Group
Complexity of Mathematical Models
Simple
Complex
Linear
Nonlinear
Algebraic Equation/ Closed-form
Differential Equation
Static
Dynamic
![Page 11: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/11.jpg)
Multiscale Systems Engineering Research Group
Model Taxonomy
System model
Deterministic Stochastic
Static Dynamic Static Dynamic
Continuous Discrete Continuous Discrete
![Page 12: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/12.jpg)
Multiscale Systems Engineering Research Group
Simulation-based Designmodel refinement model refinement
mathematical model(first-principles,
empirical, multiscale)
mathematical modelmathematical model(first(first--principles, principles,
empirical, empirical, multiscalemultiscale))
computer simulation
computer computer simulationsimulation
validationvalidationvalidation
Simulation-based designSimulationSimulation--based designbased design
scalable algorithms & scalable algorithms & solverssolvers
data/observationsdata/observationsdata/observations
geometry modeling &geometry modeling &discretizationdiscretization schemesschemes
visualizationvisualizationdata mining/sciencedata mining/science
optimizationoptimizationuncertainty quantificationuncertainty quantification
verificationverificationverificationapproximation approximation error controlerror control
numerical modelnumerical modelnumerical model
parameter inversionparameter inversiondata assimilationdata assimilationmodel/data error controlmodel/data error control
![Page 13: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/13.jpg)
Multiscale Systems Engineering Research Group
•Molecular Dynamics / Force Field
Modeling & Simulation at Multiple Scales
Various methods used to simulate at different length and time scales
nm μm mm m
pico-snsμs
ms
Length Scales
Time Scales
femto-s
s
•Tight Binding
•Kinetic Monte Carlo
•Finite Element Analysis
•Dislocation Dynamics
•Quantum Monte Carlo•Self-Consistent Field (Hartree-Fock)
•Density Functional Theory
![Page 14: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/14.jpg)
Multiscale Systems Engineering Research Group
Approximations in simulation
mathematical models numerical modelsTaylor series
Functional analysis
numerical models computer codesDiscretization (differentiation, integration)
Searching algorithms (solving equations, optimization)
Floating-point representation
![Page 15: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/15.jpg)
Multiscale Systems Engineering Research Group
Mathematical models Numerical modelsApproximation in Taylor Series
Truncation
![Page 16: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/16.jpg)
Multiscale Systems Engineering Research Group
Mathematical models Numerical modelsFunctional Analysis
Convert complex functions into simple and computable ones by transformation in vector spaces
Fourier analysis
Wavelet transform
Polynomial chaos expansion
Spectral methods
Mesh-free methods
…
![Page 17: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/17.jpg)
Multiscale Systems Engineering Research Group
Mathematical models Numerical modelsFunctional Analysis
Approximate the original by linear combinations of basis functions ’s as
In a vector space (e.g. Hilbert space) with an infinite number of dimensions
( )f x
0( ) ( )
N
i iif x c x
=≈ ∑ ψ
( )ixψ
0( ) ( )
i iif x c x
∞
== ∑ ψ
![Page 18: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/18.jpg)
Multiscale Systems Engineering Research Group
Mathematical models Numerical modelsFunctional Analysis
An inner product is defined as a “projection”in the vector space, such as
Typically we choose orthogonal basis functions ’s such that
for orthonormal basis functions
, : ( ) ( ) ( )f g f x g x W x dx∞
−∞= ∫
,f g
( )ixψ
( , , ), ( ) ( ) ( )
0 ( )i j i j
Constant i j i jx x W x dx
i j
∞
−∞
⎧ ∀ =⎪= = ⎨ ≠⎪⎩∫ψ ψ ψ ψ
1 ( ), ( ) ( ) ( )
i jx x W x dx
∞ ⎧
0 ( )i j i j i j−∞
=⎪= = ⎨ ≠⎪⎩∫ψ ψ ψ ψ
![Page 19: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/19.jpg)
Multiscale Systems Engineering Research Group
Mathematical models Numerical modelsFunctional Analysis
The coefficients ’s are computed by
The computable function is
with truncation!
ic
,
,i
i
i i
fc =
ψ
ψ ψ
0( ) ( )
N
i iif x c x
=≈ ∑ ψ
![Page 20: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/20.jpg)
Multiscale Systems Engineering Research Group
Functional Analysis – Fourier Series Approximations
where is called the fundamental frequency.
All periodic functions can be approximated by Fourier Series well!Is used in plane-wave density functional theory simulationsBecause of efficient Fast Fourier Transform (FFT)!
( ) ( ) ( ) ( ) ( )
( ) ( )
0 1 0 1 0 2 0 2 0
0 0 01
cos sin cos 2 sin 2
cos sink kk
f t a a t b t a t b t
a a k t b k t
ω ω ω ω
ω ω∞
=
= + + + + +
= + +⎡ ⎤⎣ ⎦∑
0
2Tπ
ω =
![Page 21: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/21.jpg)
Multiscale Systems Engineering Research Group
Functional Analysis – Fourier Series Approximations
Inner products
Computational complexity:O(N2)
FFT Complexity: O(Nlog2N)
( )
( ) ( ) ( )
( ) ( )
00
00
00
1
2cos 1,2,...
2sin
T
T
k
T
k
a f t dtT
a k t f t dt kT
b k t f t dtT
ω
ω
=
= =
=
∫
∫
∫
( ) 0
0
1 Tik t
kc f t e dtT
ω−= ∫ ( ) ( ) 0
0i tF i f t e dtωω
∞−
−∞
= ∫ ( )0
1
0
0, , 1N
ik nk n
n
F f e k Nω−
−
=
= = −∑ …
( ) 0ik tk
k
f t c e ω∞
=−∞
= ∑ ( ) ( ) 0
0 0
12
i tf t F i e dωω ωπ
∞
−∞
= ∫ ( )0
1
0
10, , 1
Nik n
n kk
f Fe n NN
ω−
=
= = −∑ …
Fourier Series Fourier Transform Discrete Fourier Transform
![Page 22: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/22.jpg)
Multiscale Systems Engineering Research Group
Functional Analysis – Wavelet Transform
Wavelet basis functions
where is a continuous function in both the real and reciprocal spaces called mother wavelet, a is the scale factor, and b is the translation factor.
satisfiesAdmissibility
Regularity condition
( ),
1a b
x bx
aa
⎛ ⎞−= ⎜ ⎟
⎝ ⎠ψ ψ
( )xψ
( )xψ
![Page 23: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/23.jpg)
Multiscale Systems Engineering Research Group
Example Continuous Wavelet Functions- Mexican hat
( ) 21/4 2 /22( ) 1
3
xx x e− −= −ψ π
0 10 20 30 40 50 60 70 80 90 100-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2FFT of Mexican hat wavelet
Frequency (Hz)
-10 -8 -6 -4 -2 0 2 4 6 8 10-0.4
-0.2
0
0.2
0.4
0.6
0.8
1Mexican hat wavelet
Time (t)
![Page 24: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/24.jpg)
Multiscale Systems Engineering Research Group
Example Continuous Wavelet Functions- Morlet
( )2 /2( ) cos 5xx e x−=ψ
-10 -8 -6 -4 -2 0 2 4 6 8 10-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1Mexican hat wavelet
Time (t)
0 10 20 30 40 50 60 70 80 90 100-0.05
-0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
0.04
0.05FFT of Mexican hat wavelet
Frequency (Hz)
![Page 25: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/25.jpg)
Multiscale Systems Engineering Research Group
Functional Analysis – Wavelet Transform
Continuous Transform
where is the complex conjugate of .
Inverse Transform
Discrete Transform
( ) *
,, ( ) ( )
a bf a b f x x dx
+∞
−∞= ∫ ψ
*
,( )
a bxψ ,
( )a b
xψ
( ) , 20
1( , ) ( )
a b
daf x f a b x db
c a
+∞ +∞
−∞= ∫ ∫
ψ
ψ
( )2 ,
122
j jk j
x kx
⎛ ⎞−= ⎜ ⎟
⎝ ⎠ψ ψ
k
j
![Page 26: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/26.jpg)
Multiscale Systems Engineering Research Group
Functional Analysis – Wavelet Transform
Admissibility
where is the Fourier transform of .
This implies or equivalently“No information loss in reconstruction”
“must be a wave with zero mean” -- wave-
2
0
ˆ( )d
ψ ωω
ω
+∞< ∞∫
( ) ( )ˆ i xx e dx∞
−
−∞
= ∫ ωψ ω ψ ( )xψ
2ˆ( 0) 0ψ ω = = ( ) 0x dx
∞
−∞
=∫ ψ
![Page 27: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/27.jpg)
Multiscale Systems Engineering Research Group
Functional Analysis – Wavelet Transform
Regularity condition
wavelet functions should have some smoothness and concentration in both time and frequency domains vanishing moments M1, …, MN as the scale factor a increases (admissibility: M0=0)“Fast Decay” -- -let
( ) ( ) 1
0
( ) 1 2
0
(1) 2 ( )
0 1
1 2
1 1, 0 (0) ( )
!1 1
(0) ( )!
1 1 1 1(0) (0) ... (0) ( )
0! 1
)
!
0
!
(N
k k
k
Nk k k
k
N N k
k
k
N
f a b f O xka
f a O
x
aka
f a f a f a
x dxa
O aM Ma
M
MN
+
=
+ +
=
+ +
⎡ ⎤= ≈ +⎢ ⎥
⎣ ⎦⎡ ⎤
= +⎢ ⎥⎣ ⎦⎡ ⎤
= + + + +⎢ ⎥
−
⎣ ⎦
∑
∑
∫ ψ
![Page 28: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/28.jpg)
Multiscale Systems Engineering Research Group
Approximations in M&Smathematical models numerical models
Taylor series
Functional analysis
numerical models computer codesDiscretization (differentiation, integration)
Searching algorithms (solving equations, optimization)
Floating-point representation
![Page 29: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/29.jpg)
Multiscale Systems Engineering Research Group
Numerical Model Computer CodeCompute integrals
QuadratureApproximate the integrand function by a polynomial of certain degree
x
f(x)
x1
f(xi)
bax2 x3
n=0x
f(x)
f(xi)
ban=1
x
f(x)
f(xi)
ban=2
![Page 30: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/30.jpg)
Multiscale Systems Engineering Research Group
Numerical Model Computer CodeCompute integrals
QuadratureApproximate the integral by the weighted sum of regularly sampled functional values
• e.g. Simpson’s 3/8 rule
( ) ( ) ( ) ( ) ( )3
0
(3)0 1 2 3
33 3
8
x
x
hI f x dx f x f x f x f x⎡ ⎤≈ = + + +⎣ ⎦∫
x
f(x)
f(x0)
x0
f(x1)f(x2)
f(x3)
x1 x2 x3
![Page 31: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/31.jpg)
Multiscale Systems Engineering Research Group
Numerical Model Computer CodeCompute integrals
Monte Carlo simulationLet p(u) denote uniform density function over [a, b]
Let Ui denote i th uniform random variable generated by Monte Carlo according to the density p(u)
Then, for “large” N
Variance reduction (importance sampling) to improve efficiency
1
( ) ( )b N
iia
b af x dx f U
N =
−≈ ∑∫
![Page 32: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/32.jpg)
Multiscale Systems Engineering Research Group
Numerical Model Computer CodeCompute derivatives
Finite-divided-difference methodsApproximated derivatives come from Taylor series
• e.g. forward-finite-difference
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )2 21 1' 'i i i i i i if x f x f x x x O h f x f x h O h+ += + − + = + +
( ) ( ) ( ) ( )1' i ii
f x f xf x O h
h+ −
= +
![Page 33: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/33.jpg)
Multiscale Systems Engineering Research Group
Floating-Point Representation
How does computer represent numbers?
Imperfect worldPerfect world
![Page 34: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/34.jpg)
Multiscale Systems Engineering Research Group
Ariane 5
Exploded 37 seconds after liftoff
Cargo worth $500 million
WhyComputed horizontal velocity as floating point number
Converted to 16-bit integer
Worked OK for Ariane 4
Overflowed for Ariane 5• Used same software
![Page 35: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/35.jpg)
Multiscale Systems Engineering Research Group
Do you trust your computer?
Single precision: f = 1.172603…
Double precision: f = 1.1726039400531…
Extended precision: f = 1.172603940053178…
Correct one is: f = -0.8273960599468213
yxyyyyxxyyxf
25.5)212111(75.333),( 8462226 ++−−−+=
f(x = 77617, y = 33096) = ?
Rump’s function:
![Page 36: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/36.jpg)
Multiscale Systems Engineering Research Group
Another Story
On February 25, 1991
A Patriot missile battery assigned to protect a military installation at Dhahran, Saudi Arabia
But … failed to intercept a Scud missile
28 soldiers died
… an error in computer arithmetic
1101.0 ≠×
![Page 37: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/37.jpg)
Multiscale Systems Engineering Research Group
IEEE 754 Standard
If E = 2w–1 and T ≠0, then v is NaN regardless of S.If E = 2w–1 and T =0 , then v = (–1)S×∞.If 1≤E ≤2w–2, then v = (–1)S×2E–bias×(1+21–p×T);
normalized numbers have an implicit leading significand bit of 1.If E =0 and T ≠0, v = (–1)S×2emin×(0+21–p ×T);
denormalized numbers have an implicit leading significand bit of 0.If E =0 and T =0 , then v = (–1)S×0 (signed zero)
where bias=2w–1–1 and emin = 2–2w–1=1–bias
TE
w bits t = p – 1 bits
![Page 38: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/38.jpg)
Multiscale Systems Engineering Research Group
Distribution of Values
6-bit IEEE-like formatw = 3 exponent bits
t = 2 fraction/mantissa bits
bias = 3
-15 -10 -5 0 5 10 15Denormalized Normalized Infinity
![Page 39: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/39.jpg)
Multiscale Systems Engineering Research Group
Distribution of Values(zoom-in view)
6-bit IEEE-like formatw = 3 exponent bits
t = 2 fraction/mantissa bits
bias = 3
-1 -0.5 0 0.5 1Denormalized Normalized Infinity
![Page 40: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/40.jpg)
Multiscale Systems Engineering Research Group
Round-Off Errors
Overflow error – “not large enough”Underflow error – “not small enough”Rounding error – “chopping”
http://www.cs.utah.edu/~zachary/isp/applets/FP/FP.html
![Page 41: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/41.jpg)
Multiscale Systems Engineering Research Group
Special Numbers
Expression Result
0.0 / 0.0 NaN
1.0 / 0.0 Infinity
NaN < 1.0 false
NaN == NaN false
0.0 == -0.0 true
NaN + 1.0 NaN
Infinity + Infinity Infinity
NaN == 1.0 false
-1.0 / 0.0 -Infinity
Infinity + 1.0 Infinity
NaN > 1. 0 false
standard range of values permitted by the encoding (from 1.4e-45 to 3.4028235e+38 for float)
![Page 42: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/42.jpg)
Multiscale Systems Engineering Research Group
Floating point Hazards
The result is 2.600000000000001
The result is 0.29 28
This expression does NOT equal to this expression when
0.0 - f -f
! (f >= g)
true
f
f is 0
f < g f or g is NaN
f == f f is NaN
f + g – g g is infinity or NaN
double s=0; for (int i=0; i<26; i++) s += 0.1; System.out.println(s);
double d = 29.0 * 0.01; System.out.println(d); System.out.println((int) (d * 100));
![Page 43: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/43.jpg)
Multiscale Systems Engineering Research Group
Comparing Floating Point Numbers
Try to avoid floating point comparison directlyTesting if a floating number is greater than or less than zero is even risky.Instead, you should compare the absolute value of the difference of two floating numbers with some pre-chosen epsilon value, and test if they are "close enough“If the scale of the underlying measurements is unknown, the test “abs(a/b - 1) < epsilon” is more robust.Don’t use floating point numbers for exact values
![Page 44: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/44.jpg)
Multiscale Systems Engineering Research Group
Uncertainties in M&S
Model errors due to approximations in truncation or sampling
Taylor approximation
Functional analysis
Numerical errors due to floating-point representation
Round-off errors
![Page 45: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/45.jpg)
Multiscale Systems Engineering Research Group
Two types of “uncertainties”Aleatory uncertainty (variability, irreducible uncertainty, random error)
inherently associated with the randomness/fluctuation (e.g. environmental stochasticity, inhomogeneity of materials, fluctuation of measuring instruments)can only be reduced by taking average of multiple measurements.
Epistemic uncertainty (incertitude, reducible uncertainty, systematic error)
imprecision comes from scientific ignorance, inobservability, lack of knowledge, etc.can be reduced by additional empirical effort (such as calibration).
![Page 46: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/46.jpg)
Multiscale Systems Engineering Research Group
Random Error
Determines the precision of any measurement
Always present in every physical measurement
Better apparatus
Better procedure
Repeat
Estimate
![Page 47: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/47.jpg)
Multiscale Systems Engineering Research Group
Systematic ErrorDetermines the accuracyof any measurement
May be present in every physical measurement
calibration
uniform or controlled conditions (e.g., avoid systematic changes in temperature, light intensity, air currents, etc.)
Identify & eliminate or reduce
chronological data
24
24.08
24.16
24.24
24.32
0 20 40 60 80 100
trial
![Page 48: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/48.jpg)
Multiscale Systems Engineering Research Group
Uncertainties in Modeling & SimulationAleatory Uncertainty:
inherent randomness in the system. Also known as:
• stochastic uncertainty
• variability
• irreducible uncertainty
Epistemic Uncertainty:due to lack of perfect knowledge about the system. Also known as:
• Incertitude
• system error
• reducible uncertainty
Lack of data
Input Uncertainties
Conflicting Information
Conflicting Beliefs
Lack of Introspection
Measurement Errors
Lack of information
about dependency
![Page 49: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/49.jpg)
Multiscale Systems Engineering Research Group
Summary
Modeling is abstraction
M&S always has approximationsinvolved, which are important sources of epistemic uncertainty.
Computer tricks us
![Page 50: Introduction of Computer-Aided Nano-Engineering · Taylor series Functional ... 01 0 1 0 2 0 2 0 00 0 1 cos sin cos 2 sin 2 kk cos sin k f taa t b t a t b t aaktbkt ωω ω ω ...](https://reader033.fdocuments.us/reader033/viewer/2022042415/5f3069b2c499c449c87e5a69/html5/thumbnails/50.jpg)
Multiscale Systems Engineering Research Group
Further ReadingsGoldberg, D. (1991) “What every computer scientist should know about floating-point arithmetic,” ACM Computing Surveys, 23(1), 5-48