0% found this document useful (0 votes)
240 views18 pages

CADAC Primer for Aerospace Simulations

1. CADAC is a software environment for simulating the flight dynamics of aerospace vehicles using digital computer simulations. 2. It can simulate 3, 5, and 6 degrees of freedom trajectories and supports deterministic and Monte Carlo runs. 3. CADAC includes utilities for input, integration, output analysis and display, and has been adapted for various simulation tasks including missiles, spacecraft, and airplanes.

Uploaded by

Sofiene Guedri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
240 views18 pages

CADAC Primer for Aerospace Simulations

1. CADAC is a software environment for simulating the flight dynamics of aerospace vehicles using digital computer simulations. 2. It can simulate 3, 5, and 6 degrees of freedom trajectories and supports deterministic and Monte Carlo runs. 3. CADAC includes utilities for input, integration, output analysis and display, and has been adapted for various simulation tasks including missiles, spacecraft, and airplanes.

Uploaded by

Sofiene Guedri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Appendix B

CADAC Primer

Program CADAC, Computer Aided Design of Aerospace Concepts, provides an


environment for the development of general purpose, digital computer simulations
of time-phased dynamic systems. It manages input and output, generates stochas-
tic noise sources, controls state variable integration, and provides postprocessing
analysis and display. CADAC has proven its adaptability to many simulation tasks:
air-to-ground and air-to-air missiles, ground-to-space and space-to-ground vehi-
cles, and airplanes. The CADAC environment is suitable for three-, five-, and
six-DoF simulations. It supports deterministic and Monte Carlo runs. Output can
be listed or plotted.
CADAC is hosted on an IBM-compatible PC with a minimum of 32 MB of
RAM, 25 MB of free disk space, and Microsoft’s Window operating system. The
graphics utilities are best displayed on a 1024 x 768-resolution screen with font
size set to small.
CADAC consists of CADAC Studio and CADAC Simulations. Both are pro-
vided on the CADAC CD. CADAC Studio, written in Visual BASIC, analyzes and
plots the output with programs KPLOT and SWEEP and provides utility function
for debugging. The vehicle simulations are written in FORTRAN 77 with some
common language extensions. The preferred compiler is Compaq’s (formerly Dig-
ital) Visual FORTRAN for Microsoft’s Developer Studio. Other compilers (like
Silicon Graphics) may require minor modifications of the [Link] executive
routine.
The CADAC Studio comes with four volumes of documentation:
1) Quick Start gets you started with the test case and provides an overview of
the input files, executables, and output files.
2) User Documentation addresses all capabilities of the CADAC development
environment. It should give answers to most questions that come up during the
design of a new trajectory simulation. Tables, examples, and matrix utilities pro-
vide useful references. The serious CADAC user should read this document in its
entirety.
3) Program Documentation provides details for many subjects: building the
input and the header files, the integration routine, generation of stochastic variables,
execution of multiruns, sweep runs, Monte Carlo runs; utilities that aid in building,
documenting, and analyzing CADAC simulations. It should be used as reference
to answer specific questions.
4) Real-time CADAC Documentation addresses the functionality and capabil-
ities of the real-time CADAC methodology. It explains how to generate the data
files for the real-time version of the modules and the validation procedures.
CADAC is essentially a trajectory program. Over the years features were added
to make it more useful. Some of these capabilities are the following:

517
518 MODELING AND SIMULATION OF AEROSPACE VEHICLE DYNAMICS

Vector integration State vectors can be integrated as an entity without break-


ing them up into scalar components.
Staging Modes of trajectories, like midcourse or terminal guidance, can be
sequenced in sections called stages. They are initiated by IF statements in the
[Link] file.
Multiruns Several trajectories can be combined. For instance, if the sensitivity
of a seeker parameter is to be investigated, new parameter values are scheduled
in separate group runs and loaded into the global C-array at the appropriate stage
with the keywords LOAD and STAGE.
Reinitializing To save execution time, the state of the trajectory can be saved
at a certain event, say seeker acquisition, and the following group runs are reini-
tialized at this point. The keyword SAVE will write the global C-array to the file
CSAVE .ASC .
Sweep runs This feature is used to automate the calculation of launch en-
velopes and footprints. The launch position or target location is swept through a
polar grid. The SWEEP utility analyzes and displays the results.
Single Monte Carlo runs Stochastic runs are generated by the keyword
MONTE, followed by the number of desired runs. The noise sources, like wind
gusts, INS errors, and seeker noise, are defined by the keywords GAUSS, UNIF,
EXPO. or RAYLE. The output file [Link] saves the random values, which
can be used to rerun a particular trajectory realization. The MCAP program av-
erages the trajectory parameters and calculates means, standard deviations, and
correlation coefficients. Histograms and error ellipses are displayed by the KPLOT
program.
Sweep Monte Carlo runs Sweep runs can also be executed as a family of
Monte Carlo runs. Just introduce the keyword MONTE with its replication number
into a sweep run.
Weather Atmospheric conditions, like temperature, density, pressure, and
wind, can be specified as tabular functions of altitude using the keyword WEATHER
in the [Link] file.
Real-time execution The CADAC simulation can be converted by the CON-
[Link] program into a real-time capable code package, suitable for a man-in-
the-loop simulation.
The best way to learn CADAC is by trying. So get the code from the CADAC
CD and a FORTRAN compiler, then start running the test cases. To help you over
the initial hurdles, I include a primer that gets you going.
APPENDIX B: CADAC PRIMER 51 9

... building your own simulation


1. -
Computer Aided Design of Aerospace Concepts
2. Run GHAME3 test case to get started
3. Look a t console display and plot output
4. Modify [Link] file
5. Define output in HEAD-ASC file
6. Plot output in 3 Dimensions
7. Modify Aerodynamic Module A1
8. Develop your own Module
9. Module assignments and sequencing
[Link] executes integration of state variables
[Link] [Link] in four steps
[Link] [Link]
[Link] your own SSTO simulation
[Link] SSTO output should look like this
[Link] aids for [Link]
1. Computer Aided Desiqn of Aerospace Concepts
... simulating the flight dynamics of aerospace vehiclcs
History

1966 Lilton Industry D


Run-'lime Capabilities 197X CADAC-Air Force z
I998 CADAC Version 3 0 0
Staging 2000 CADAC Vcrwm 3 I
Special functions
Random distributions CADAC Family of Simulations
Multiple runs
Monte Carlo runs CADAC 2 - 3 DoF, spherical edrth, CHAME3, ROCKET3
Re-Initialization of runs CADAC 3 - 5 DoF, flat earth, air-to-ground CRUISE5
CADAC 4 - 5 DoF, flat carth, air-to-air, A1M5, SRAAM5
Automated envelope generation
CADAC 5 - 5 Dok, spherical earth %
CADAC 6 - 6 DoF, flat edrth, missilcb SRAAM6 D
rn
Plotting and Analysis of Output CADAC 7 - 6 DoF, flat earth, aircraft FALCON6 n
CADAC X - 6 DoF, elliptical edrth, hypersonic GHAME6
KPLOT $
2-D1M, Strip Charts, 3-D1M, Globe, 9
0
Histograms, Bi-variate distributions Compatibility
rn
SWEEP
FORTRAN 77 with extcnsions
<
rn
. .
Launch envelopes 7

Footprints Compact Visual Fortran is prcfcrred compiler


Platforms: ..
MCAP r-
Monte Carlo analysis All Windows platforms rn
QPRINT Adaptable to Silicon Graphics coniputcrs
?
Z
Listing of variables D
5
0
v)
2. Run GHAME3 test case to qet started
I . Build [Link]
2. Place [Link] in project directory or build
from [Link] [Link]
3. Build [Link]
MKHEAD3. EXE CADIN3. EXE
4. Run [Link]
5 . Look at Screen output compile & link
6 . Plot from [Link] file [Link] [Link]
[Link]

m
File Names

[Link] Vehicle subsystems (modules) [Link] [Link] [Link]


[Link] Utility matrix routines (V.3)
[Link] CADAC executive (V3)
[Link] Free format input file
[Link] Fixed format Fortran input
[Link] Defines output to [Link]
[Link] Output file for plotting
[Link] Output scrolled to screen
[Link] Compiled Fortran program
[Link] Utility program (V3)
[Link] Utility program (V3)
3. Look at console display and plot output
[Link]
[Link]

1
2-DIM

INTEST.ASCGHAME3,[Link] CUM6 31JAN-2000

[Link]:GHAME3,2-PliASED
TIME
0.0
0.0
2.0
4.0

10.0
12.0
BALT
3000.
3000.
3013.
3057.
6.0 3177.
8.0 3294.
3408.
3542.
VMACH
0.00
0.76
0.74
0.71
0.68
0.66
0.63
0.87
CLIMB
PDYNMC
0.
28401.
26588.
24632.
22509
20467.
18534.
34435.
31-JAN
THTVGX
0.0
0.0
4.9
9.3
13.2
16.5
19.3
17.7
il
j w-

14.0 3709. 1.03 47289. 17.9 0 10 20 30 40 50 80 70 80 90 '


16.0 3910. 1.06 49242. 19.2 TIME
TIME BALT VMACH PDYNMC THTVGX
18.0 4175. 1.08 49217. 20.3
20.0 4440. 1.10 49197 21.4
22.0 4719. 1.12 49153. 22.4
24.0 5012. 1.14 49133. 23.3
26.0 5305. 1.16 49123. 24.0
28.0 5601. 1.19 49110. 24.7
30.0 5898. 1.21 49101. 25.2
32.0 6197. 1.24 49094. 25.7
34.0 6498. 1.26 49091. 26.2
36.0 6862. 1.29 48976. 26.5
0 10 20 30 40 50 gp,q~ 60 70 80 90 100
4. Modify [Link] file
Module TITLE [Link]:GHRME3,2-PHASED CLIMB
MODULES
calling G2 GEOPHYSICS
A2 PROPULSION
sequence A1 AERODYNAMICS
A3 FORCES
D1 NEWTONS LAW
END
OPTMET = 1.0000 ! E Units of measure 1 = metric: 0 = English
! * * CONTROL * *
ALPHAX = 7.0000 ! D Angle of attack - deg
PHIMVX = 0 . 0 0 0 0 0 ! D Bank angle of maneuver plane wrt vertical - deg
! * * PROPULSION * *
MPROP = I N T ( 1 ) ! D =O:Motor off.=l;throttlecommand,=2:autothrottle
THRTL = 0.20000 ! D Throttle. controlling the fuel-air ratio~ ND
THRTLMAX = 2 . 0 0 0 0
! * * VEHICLE DATA + *
! D Maximum throttle Setting permissible - ND
m
SREF = 557.42 ! D Aerodynamic reference area - "1-2
! * * * LAUNCH COND * *
BLON = 4.8770 ! I/G Vehicle longitude - rad
BLAT = 0 . 4 9 6 2 0 ! I/G Vehicle latitude - rad
BALT = 3000.0 ! 1/0 Vehicle altitude = m
Stage at DVBE = 250.00 ! I/G Geographic speed - m/s
time > 10 s PSIVGX = 3 0 . 0 0 0 ! I Heading angle from north - deg
THTVGX = 0.00000 ! I Flight path angle from horizontal - deg
sec ! * * EXECUTIVE * *
PPP = 0.50000 ! E Time interval writing to [Link] or [Link] - sec
Execute CPP = 2.0000 ! E Time interval writing to Screen or [Link] - sec
DER = 0.01000 ! E Integration interval - sec
program ! ##1 STAGE # #
IF TIME 10.000 ! E T r a j e c t o r y time - s
MPROP = INT(2I ! D =O:Motor Off,=l:throttlecommand,=2:autothrottle
QHOLD = 50000. ! D Dynamic pressure hold command - Pa
Fortran ALPHAX = 2.500 ! D Anale of attack - deo
! ##2 STAGE # #
stop ! E Trajectory time - s
IF TIME > 50.000
ALP= = 2.4000 ! D Angle of attack
~
* deg
ALPHAX = 3 . 0
! # # 3 STAGE STOP # #
IF TIME > 9 0 . 0 0 ! E Trajectory time - s
RUN
STOP
UI
IU
P

5. Define output in [Link] file


SCROLL to Messagcs written to screen
A Enables
[Link]

Files written o local directory


writing

screen L<

Integer in third
column specifies
SCiOLL NOFCHOIN NOINTMSG NOS'TGMSG NOKANVAR NOTKILTRTN TRA&r NOSTATATN NOSTATASC NOTABOIJ'I
decimals I' ?on0 TIME
lb0b HALT I VPhTcle a l t i t i i d e = m
I 1603 THTUCX T F l i q h t p a r h anqle f l u i n h o r l r . ~ deg
Screen 2 LO6 VMACII 0 M a c h number O f rocket
70.1 mymr G Dynamli p r e s s u r r P*
~

Q
FXFCU'I'IVT?
51 KEAK'I'II
57 CRAD
Separator in first column '11 ACXAV
58 WFTT3
* ENVIRONMENI'
701 TEMPK
Commcnt lines from 202 PRESS
here on down 203 RHO
LOR VSOUNU
PO5 GRAV
* 206 VMACH
[Link]

No TABS Permitted
Turn-on'white spacc display'
CTRL+SHIFT+8 and rcinovc any
tabs(>>)
COMMON Variable
location namc
APPENDIX B: CADAC PRIMER 525
526 MODELING AND SIMULATION OF AEROSPACE VEHICLE DYNAMICS
.-c
8. Develop vour own Module
('+.~'L'+'*""*+**''tt++*f*tt++++*+t**++*t*

SURROIITINE XXI
r..""*'*"***'+"'*+"+++"'L++++l"".*,*

C"'
COMMON c ( 3 h i u )
INITIALIZATION Initialization module XXI is callcd y_ncc
EQlJIVA1,ENi'E (C(1210) ,IXll lnitializcs variables
c 1x1 I p l a c e h o l d e r for table look-up NU
~

rxi=i
~

Identifies state variables to be intcgrated


RETURN Module XX is called twice for every integration step (Euler predictoricorrector)
END
~+*"'***+++**"'**+*~***~**.*~.*******~~~* Calculates the derivatives of the statc variables
SUFRUIJTINE XX
c.*"***'++**+***+'*~***.*~*,***~~~***~~~~*
Executcs all othcr Computations
COMMON c i > i i o ) Calls utility subroutines MATyyy, VECyyy, TABLy,TABLPy
c*** INPUT DATA
EaUIVALENCE ( C ( 1 2 0 3 ) ,AI,PHAXI
Calls
J I IQ lower Icvel of subroutines XXyyyy m
C ALPHAX = D A n q l e O f attack deg Talks to other modulcs by EQUJVALENCEing to COMMON(3510) 0
C*++ INTTIALIZATIUN
~

INPUTDATA: D
D
EQUIVALKNCF ( C ( 1 Z L O I , I X 1 ) 0
C * * + INPUT FROM EXECUTIVE INITIALIZATION: I D
0
[Link] ( C ( O ~ S L,CRAD)
C*++ TNPUT FROM OTIlER MODULES
I INPUT FROM EXECUTIVE: E
EQUTVALENCE (C(02061 ,VMACHl INPUT FROM OTIIEK MODULES
C VMACH- 0 Mach number of rucket ND
C * + * OUTPllT TO OTHER MODULES
~

STATE VARIABLES: S
EOtlIVALENCE ( C ( 1 2 0 l ) , C l > l OUTPUT I0 OTHER MODIJLES: 0
EQUIVA1,RNCT ( C 1 1 2 0 2 ) , C L )
c CD = 0 L > r q coefficient N D ~
DIAGNOSTICS: G
C CT, 0 Lift r o e f f i c i r r i t
~ ~ND Avoid:
C"+ DIAGNOSTICS
labeled COMMON
CALLS to subroutines of other modules
ul
N
a,
9. Module assiqnments and sequencinq
MODULES Module call-sequence
cstablishcd in [Link]:
MODULE XX I MODULENAME I COMMON
Al I AeroCocfficicnts I 1200 - 1299 G2 ENVIRONMENT >
I
~ ~~

A2 Propulsion 1300 - 1399 A2 PROPULSION z


0
A3 Forces & Moments 1400- 1499 A1 AERODYNAMICS
A4
CI
C2
Free
Guidance
Autopilot
1500 - 1599
800 - 899
900 - 999
A3 FORCES
D1 NEWTONS LAW
END L
1
7
C3 TVC 1000 - 1099
c4 Actuator 1100- 1199
G21 GEOPHYSICS
DI Newton Eqs. I600 - 1699 A21 PROPULSION
D2 Eulcr Eas. 1700- 1749 Once through A11 AERODYNAMICS
D4 Free I900 - 1999 for initialization A31 FORCES
GI TarEet 100-199 D1 I NEWTONS LAW

I G2
G3
G4
I Geophysics
Kinematics
lntercept
1 200-299
300-399
1750-1799
S1 Seeker 400-499
s2
~~ Radar 500-599 <
s3 NAV Filter 600-699 G2 GEOPHYSICS rn
S4 INS 700-799
Twice through
for every A2 PROPULSION z
SWEEP MODULES Sweep Methodology I800 - I824 integration step A1 AERODYNAMICS Prn
CADAC EXECUTIVE Controllinz- 1-99 A3 FORCES
Methodology 2000 - 2999 D1 NEWTONS LAW
10. [Link] executes intearation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SUBROUTINE A21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C
C*** INPUT FROM EXECUTIVE

Initialization Module stores


C
D
-0
derivative and state C-locations in -0
EQUIVALENCE lC(2867),IPLVl rn
IPL( 100) and IPLV( loo), C
C NIP = E Number of variables to integrate
z
respectively C IPL(100) = E Start of derivative c-array locations 52
c I P L V ! ~ O O I = E S t a r t of state C-array locations X
C
C*** I r i t i a l i z a t i o n of inregration v a r i a b l e m
0
D
0
C
RETURN
R
-0

Integration subroutine AMRK


END
........................................
SUBROUTINE A2
nz
.....................................................
gets derivative value from rn
Module and predicts state value at
C
C*** STATE VARJABLES
n
next time step. EQUIVALENCE IC ( 1304
EQUIVALENCE l C ( 1 3 0 5

AMRK corrects prediction by a C FMASSED = S Derivative of fuel mass expended - kg/sec


second pass and returns the value C FMASSE = S Fuel mass expended kg ~

C
of the state IF![Link].0.1 . . ~ ~.~
. ~ .. . ~~~

VXXSS=VXXSSO-FMASSE
C
RETURN
Ln
W
0
11. Buildina [Link] in four steps
........................................
I . Merge Modules into [Link] SUBROUTINE A1
~'*"+""'++*~++"+""'+"-"**~
(Window PC use DOS COPY command) C+'+ INPUT DATA -
EQUIVALENCE lCl12031 ,ALPHRX) z
C ALPM D Angle of attack - deg
~
G)
C'+* INITIALIZATION D
[Link] EQUIVALENCE lCl12101 ,IXll Z
C
"
' INPUT PROM EXECOTIVE
EQUIVALENCE IClOO521,CRADI
0
2. Builds columns of C-Locations '"C INPUT FROM OTHER MODULES
EQUIVALENCE l C l O 2 0 6 1 ,VMACHI
Error checking C VMACH= 0 Mach number of rocket ~ ND
C**+ OUTPUT TO OTEER MODULES
EQUIVALENCE l C l 1 2 0 1 1 , C D l
EQUIVALENCE lCll2021 ,CLl
C CD = 0 Drag coefficient ND
9
4
~

[Link] C CL 0 Lift coefficient


~ ~ ND
C*** DIAGNOSTICS
EQUIVALENCE lCll2041 , C D O l
C CDO = G Zero lift drag coefficient ~ ND

. .
7

I I
12. Buildina [Link] T I T L E [Link]
MODULES
G2 GEOPHYSICS
A? [Link]
A1 AERODYNAMTCS
A 3 FOKCES
D 1 NEWTONS LAW
END
! * * * Launch C u r i d i t i o n s * * *
PSIVCX = 90 ! I I I e a r i i r i q angle f r o m n o r t h deg
TBTVGX ~ U ' I Fliqht path angle f r o r h o r l m n t d l ~ deg
UVRE = 4 0 0 ! I /[; Geographic speed ~ m/s
RUN
Build INPUTASC' STOP D
-u
I S C R O L L NOECHOIN NOINTMSG NOSTGMSC NORANVAR N O T R A J B I N T R A J A S C NOSTATBIN
-0
rn
z
[Link]
I 200U
1606
TIME
BALT I VrhTcle altitude ~m
I [Link] I 0
X
1 1603 THTUGX I F l i q h t p a t h a n i l e f r o m horizontal ~ deg
m
1
2 206 W C H 0 Mach n u m b e r of r o c k e t

1-
2 07 I'DYNMC G uynamic P r P S S U r e Pa
[Link] 0
" EXECUTIVE
D
51 REARTH E R a d i u s of Edrth m
0
~

D
1 1 51 C W
* NEWTON'S [Link]
* 1601 PSTVGX
E Conversion f r o m r a d i a n s t o degrees

I Heading a n g l e f r o m n o r t h deq
= 57.298
0
-0
nz
~

* 1603 THTVGX I F l i g h t p a t h angle from horizontal ~ deg


[Link] * lhli DVBE T / G Geographic speed m/s ~

rn
n
I
I N P U T . ASC -GHAME3, C L l M R
01 OUTPUT 2 . 3
01 STAGE 2 . 3
0 2 GZ ENVIKONMENT
0003
0004
0023
rziizq
07 A2 PROPUMION 0003
[Link] INPUT.TP5
II 02 A 1 AEROUYNAMlCS 0002
0 2 AJ
02 r)l
04**'
0 3 DVBE
FORCES
NEWTONS T A W
00n4
0011
LAUNCII C O N D I T I O N S
1613 400.00
0 5 L'SIVGX 1602 90 noo
ul
W
R3

13. Build your own SSTO simulation


A2 MODULE Propulsion

Liquid throttlablc rocket motors


Thrust is acting parallel to the body x-axis. Test Case D
z
0

Vehicle Mass = 25243 kg (no fuel) t sec a deg throttle


< 200 22.93 .9
200 -400 5.73 .9
> 400 5.73 .5

1.569 0.815
.OX50 1.4X2 1.185
1.115 1.135
1.063 1.040
20.0 1.033 I.022
14. Your SSTO output should look like this

D
-0
-0
rn
z
E
X
??
0
D
0
D
0
-0
z
z
rn
n

0 100 200 300 400 500 600 700 Ln


w
0
ul
W
15. Debuqqinq aids for [Link] P

[Link] flags the following errors: z


D
I [Link]
Variables equivalenced to different C- locations + ‘lener’ code in [Link]
D
z
0
C-location equivalenced to several variables ‘*’ code in [Link]
Mismatch between EQUIVALENCEd and DIMENSIONed arrays size

-
-
~ ~ ~ ~~

[Link] maps the usage of all EQUIVALENCEd vanables


[Link]

HEAD ASC - Subroutine where vanable is defined


Subroutme where vanable is used
Rn
Subroutine call where variable is in argument list %
9
0
CompilerlRunTime Diagnostics (Digital’s Visual Fortran 6.0) rn

EI- [Link]
To check for spelling errors during compile:
ProjectlSettings/FortraniCategory/CompilationDiagnostics: v Un-Initialized Prn
Variables, v Unused Variables
Project/Settings/FortranlCategory/Optimization: *Full Optimization
To check for array dimensioning errors during run-time:
ProjectlSettingdFortraniCategoryEnnTime: v General Traceback
a
Run-Time Out

Information, v Array & String Bounds

You might also like