UNCLASSIFIED AD-MODTRAN: An Enhanced MODTRAN Version for Sensitivity and Uncertainty Analysis G....
-
Upload
jonathan-lockhart -
Category
Documents
-
view
215 -
download
0
Transcript of UNCLASSIFIED AD-MODTRAN: An Enhanced MODTRAN Version for Sensitivity and Uncertainty Analysis G....
UNCLASSIFIED
AD-MODTRAN: An Enhanced MODTRAN Version for Sensitivity and Uncertainty Analysis
G. Scriven, N. Gat, J. Kriesel (OKSI)J. Barhen, D. Reister, Oak Ridge National Laboratory
M. Fagan, Rice University
26 th ANNUAL REVIEW CONFERENCE ONATMOSPHERIC TRANSMISSION AND RADIANCE MODELS
23 and 24 September 2003The Museum of Our National Heritage
Lexington, Massachusetts
UNCLASSIFIED
Acknowledgements
Missile Defense Agency (MDA):Lt. Col. Gary BarmoreCol. Kevin GreaneyDr. Harry HeckathornJames Kiessling
AFRL/PRSA:Dr. Robert LyonsTom Smith
UNCLASSIFIED
Outline• What is Automatic Differentiation (AD)?
• Creation of user friendly interface (GUI)
• Demonstration of AD-MODTRAN
• Application of AD-enhanced codes
• Status of AD-MODTRAN
• Recommendations
UNCLASSIFIED
How it works•AD computes analytic derivatives via symbolic differentiation
•Applies the chain rule to compute derivatives of outputs w.r.t. inputs
•Follows loops, conditional statements, subroutines, common blocks, etc.
•Can create the entire sensitivity matrix (Jacobian) in a single run of the code
What is Automatic Differentiation (AD)?
))(()(
)())((
T
LTTL
TT
L
TLTLo
o
o
Original code
User specifiedvariables
Adiforprocessor
Derivativecode
Basic Enhancement Process
UNCLASSIFIED
x
y Exact
der
ivativ
eFinite Differences
Automatic Differentiation (AD) vs. Finite Differences (FD)
AD Derivatives are analytic (exact)Independent of step sizeComplete Jacobian with single executionAD is computationally more efficient
FDDerivatives are approximateDepends on step size Multiple runs (one variable at a time)FD is 15-30 times slower than AD
• Historically, AD-enhanced codes have been difficult to create
UNCLASSIFIED
OKSI’s AD Implementation ProcessOriginal
code
User specifiedvariables
Setupfiles
ADtools
anyconflicts?
Derivativecode
Createnew user interface
Compileand link
ValidateAD results
User-friendly,validated
AD-enhancedcode
resolveyes
no
Final product
•Only the differentiation is automatic, other steps require significant developer efforts (yellow)•OKSI created supplemental tools to further automate the process•These tools include GUI’s to make the operation of the AD-enhanced code more intuitive
Any invalid
results?
no
yes
UNCLASSIFIED
• The 3 GUI programs are designed to work with all AD-enhanced codesInput GUI: handles case setup and independent variable (IV) selectionOutput GUI: handles output data selection for visualization/application Uncertainty GUI: handles bookkeeping of IV uncertainties
• GUIs have been tested on AD-MODTRAN and AD-SPURC
UncertaintyAnalysis
Real-timeSimulations
InverseProblems
AD-enhanced code
Wrapper
InputGUI
UncertaintyGUI
OutputGUI
Etc.
Applications
OKSI User Tools: Universal GUI Approach
UNCLASSIFIED
Demonstration of AD-MODTRAN
UNCLASSIFIED
0 5 10 15 20Altitude, km
0
50
100
150
200
250
300
350
400
450
500
Se
nsi
tivity
tow
ate
rva
po
rd
en
sity
5 m4 m3 m2 m
X-Y Plots Surface Plots
Sensitivity of target intensity (w/sr/m) to atmospheric water vapor profile (g/m3)
4 plot types available from Output GUI:1) pie/bar charts 3) surface plots (2D)2) X-Y plots (1D) 4) image cubes (3D)
sensitivity
Sample AD Output
UNCLASSIFIED
2 3 4 5Wavelength, m
0
50
100
150
200
250
Inte
nsi
ty,k
w/s
r/m
0 0.05 0.1 0.15 0.2 0.25 0.3
Flowfield Temperature
Flowfield CO2 mole fraction
CO2 Bandmodel Parameters
Flowfield CO mole fraction
Aspect angle
Atmospheric temperature (h=2 km)
Atmospheric temperature (h=3 km)
Range
Missile altitude
Atmospheric temperature (h=4 km)
Inpu
t Par
amet
er
Fraction of Total Uncertainty
Pressure, mbar Temperature, K H2O, g/m3
200
220
240
260
280
300
320
0 2 4 6 8 10 12Altitude, km
TRUE
Retrieved
0
200
400
600
800
1000
1200
0 2 4 6 8 10 12
Altitude, km
TRUE
Retrieved
0
2
4
6
8
10
12
14
0 2 4 6 8 10 12
Altitude, km
TRUE
Retrieved
Applications of AD-enhanced OutputSensitivity/Uncertainty Analysis
Real-time, Physics-based Simulations(ex: turbulent fluctuations)
Inverse Problem Solutions(ex: atmospheric retrieval)
Error Propagation
20%
10%
5%
Movie
UNCLASSIFIED
Status of AD-MODTRAN
• Handles about 70% of ALL inputs and 90% of all outputs
• AD-MODTRAN should compile on any machine
• GUIs run only on Windows based platforms
• Minimal validation testing has been done
• Currently available as an alpha release
• Request form may obtained at:
www.oksi.com; choose “projects”; then “AD-enhanced MODTRAN”
UNCLASSIFIED
Recommendations
• Get user input!
• Address ALL inputs and outputs in AD-MODTRAN
• Create automated validation tools (using finite differences)
• Apply AD to latest version of MODTRAN
• Implement AD-MODTRAN in existing projects (atm. comp., simulations, …)
• Apply AD to SAMM2
UNCLASSIFIED
Backup Slides
UNCLASSIFIED
List of IVs List of DVs
Independent Variables (IVs) count
User input file (TAPE5) 48sensor specificationsviewing geometry
Band model parameters 1,152,000s/d &1/d all species, temps, wavenumbers
Atmospheric profiles 600temperature, pressure, densityspecie concentrations
TOTAL 1,152,648
Dependent Variables (DVs) Count
Spectral Transmittance 104,000
Spectral Radiance 40,000
Average Transmittance 1
Integrated Radiance 1
TOTAL 144,002
This list accounts for about 60% of the IVs and 80% of the DVs
# of possible sensitivities = 1.66 x 1011
in a single AD-MODTRAN execution!
Parameters Currently Handled by AD-MODTRAN Code
UNCLASSIFIED
Example: fluctuating plume temperatures due to turbulent mixing/chemistry
A) Assume temperatures fluctuate randomly with a Gaussian distribution
B) Compute resulting pixel radiances using AD derivatives
2
Tmean
Li,j
Steady-state(SPURC)
Sensitivity(AD-SPURC)
4. Physics-based Simulations
UNCLASSIFIED
10-5 10-4 10-3 10-2 10-1
Step Size, degrees
-0.909
-0.908
-0.907
-0.906
-0.905
-0.904
-0.903
-0.902
-0.901
No
rma
lize
dD
eri
vativ
e,
DV
/IV
*IV
/DV
FDAD
10-6 10-5 10-4 10-3 10-2 10-1 100 101
step size
10-4
10-3
10-2
10-1
100
101
Err
or,
%
Error = (AD-FD)/AD x 100%
IncreasingNonlinearity error
Increasing Truncation &
round off error
• Ideal FD step size is not known apriori• Multiple FD runs (per IV) required to determine appropriate step size• Optimal step may still have residual error
AD vs. FD: computational accuracyExample case: IV – aspect angle (130°)
DV – Total Intensity (178 kw/sr)
UNCLASSIFIED
0 5 10 15 20
Number of Independent Variables (IVs)
0
5
10
15
20
25N
orm
aliz
ed
Exe
cutio
nT
ime Automatic Differentiation (AD)
Finite Difference (FD)
AD vs. FD: computational efficiency
•AD is about 5 times faster than FD (when ideal step size is known apriori)•In reality AD will be about 15 to 30 times faster (for unknown ideal step size)