simulation of apollo guidance computer l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Simulation of Apollo Guidance Computer PowerPoint Presentation
Download Presentation
Simulation of Apollo Guidance Computer

Loading in 2 Seconds...

play fullscreen
1 / 15
clara

Simulation of Apollo Guidance Computer - PowerPoint PPT Presentation

182 Views
Download Presentation
Simulation of Apollo Guidance Computer
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Simulation of Apollo Guidance Computer • Main aim of project: • To produce a fully functional Block II LGC (Lunar Module version of the AGC) simulator/emulator running the original MIT-produced code and interacting with the user via reasonably accurate simulations of spacecraft controls • Though currently based on the LGC, the simulator would, with some alteration, also be able to represent the CMC • The AGC simulator is very much a “work in progress”! G146/MAPLD 2004

  2. Motivations • Why? • To provide a working AGC based on original materials rather than a functional simulation • To provide an interesting and accessible history of computing educational resource • To honour the efforts of the programmers, engineers and managers involved at MIT/Draper Labs • To preserve some AGC materials in a machine-readable form • To facilitate statistical analysis of AGC performance • To allow better comparison with other 1960’s computers (has the AGC had a bad press?) G146/MAPLD 2004

  3. The AGC • AGC in context • AGC used in both Apollo command (CMC) and lunar (LGC) modules • First true Digital Autopilot • Core of PGNS: • alignment and control of IMU via AOT • DAP including autostabilisation modes via RCS as part of PGNCS • autoflight capabilities including descent, landing, ascent and rendezvous • Updates AGS to provide backup abort capability in case of PGNS failure G146/MAPLD 2004

  4. Highlights of LGC • Hardware • Memory word size: 15 bit + 1 parity bit • 36 banks comprising 1K words per bank • 2K erasable memory • Main accumulator (A) and subsidiary registers (L and Q) • 24 Channels provide communication to and from external equipment (plus L and Q registers are also addressable as channels) • Modified ones-complement integer arithmetic (except for counters) so +0 and -0 exist and are used heavily in software • Fixed-point FP arithmetic (programmer must handle scaling) • Double precision FP (28 data bits) also available • Accumulator uses two sign bits to detect overflow conditions • Cycle time: 11.7s - most basic instructions use two cycles (max: 6 cycles for DIV instruction) • Interpretative instructions provide advanced mathematical manipulations (e.g. vector and matrix manipulations) – speed: around 1ms per instruction G146/MAPLD 2004

  5. Highlights of LGC • Software • Time-shared, priority-driven OS – up to 7 (6 for CMC) jobs can scheduled at once • Interrupt-driven – 10 interrupt levels associated with timers and external hardware • Basic instructions implemented in hardware • More complex instructions (e.g. vector and matrix manipulations) provided by an interpreter to allow ease of application programming – can be combined with basic instructions for greater programming flexibility G146/MAPLD 2004

  6. A few interesting AGC instructions (1) • CCS Compare, Count and Skip • 4-way branch - provides a convenient loop control mechanism CCS k Inst-a if (k)>0 A:=(k)-1 and branch to Inst-a Inst-b if k=+0 A:=0 and branch to Inst-b Inst-c if k<0 A:=ones-comp((k))-1 and branch to Inst-c Inst-d if k=-0 A:=+0 and branch to Inst-d • N.B. Not all branches need to be used (e.g. if (k) always >= +0) G146/MAPLD 2004

  7. AGC instructions (2) • TS Transfer to storage TS k Inst-a Inst-b • k := A • if A is in positive or negative overflow, skip to Inst-b, otherwise continue from Inst-a (implication of this instruction is that the programmer must always be aware whether A could be in a overflow condition) • INDEX index the next instruction • Used to access array structures, e.g.: CA valueLoad accumulator with contents of value INDEX offset Add contents of offset to next instruction AD base Add accumulator to base(offset) • Can also be used in sequence with other INDEXes G146/MAPLD 2004

  8. Sample AGC program SR = 21 EB = 3 FIVE DEC 5 NINE DEC 9 VALS OCT 52525 SETLOC 2400 COUNT ERASE SETLOC 300 TABL1 ERASE +9D EBANK= 5 SETLOC 4000 INHINT CA FIVE TS EB START CA NINE LOOPINI TS COUNT CA VALS INDEX COUNT TS TABL1 CCS COUNT TCF LOOPINI CA NINE LOOPAGIN TS COUNT INDEX COUNT CA TABL1 TS SR CA SR INDEX COUNT TS TABL1 LOOPTEST CCS COUNT TCF LOOPAGIN RELINT ... • Equivalent to… (assuming 15 bit words) #DEFINE vals 052525 // inhibit interrupts for (count=9;count>=0;count--) { tabl1(count)=vals; } for (count=9;count>=0;count--) { tabl1(count)=(tabl1(count)>>1) | ((tabl1(count) & 1) << 14); } // enable interrupts ... • Note that the Shift-Right register rotates any value written to it G146/MAPLD 2004

  9. Simulator basics • The simulator provides a real-time emulation of the LGC, DSKY and other associated LM systems in a package for use under Windows XP • Written in C++ (the AGC itself) and Visual Basic (DSKY and other systems) • these two major components communicate via DLLs • also possible to interface other programs to AGC • The AGC simulator adjusts its speed automatically to give the correct 11.7s clock rate G146/MAPLD 2004

  10. Sources used • Available sources • Documentation • History of Recent Science and Technology project (mostly ex-MIT/Draper Labs documents) • Apollo Lunar Surface Journal (operational documentation, checklists etc.) • Source code listings (pdf files) • Luminary 1C (for LGC - two versions prior to Apollo 13 flight release) • Colossus 249 (for CMC - as flown on Apollo 9) • See References for more details G146/MAPLD 2004

  11. Construction • Method • Luminary source code entry (c1500 pages) • available as MS Excel and text files • ‘YUL assembler’ written (in Perl) • Assembled machine code checked against original core listing (and later against another AGC enthusiast’s version) • AGC written and tested • Interface DLL written • DSKY and other components written • Testing against original LM checklists G146/MAPLD 2004

  12. Progress so far • LGC • Full instruction set operational • Timers and external interrupts operational • Fully functional DSKY • Associated spacecraft systems • Major associated LM switches and circuit-breakers implemented • Mechanically functional AOT (no simulated starfield) • Limited ACA/TTCA hand-controller simulation and RCS graphic • Limited IMU functionality • External systems • Basic telemetry downlink display • Executive and Waitlist display • Basic statistical display G146/MAPLD 2004

  13. Work to do • The following features are planned for the future (not in any particular order): • Fully implement IMU • Simulate vehicle dynamics • Finish implementation of AOT to permit star-based alignments • Emulation of microcode instructions • Improve statistical performance analysis • Acknowledgments • Thanks are due to Ron Burkey (who has been working independently on an AGC simulator) for providing a series of stimulating questions during my work and for permitting the checking of the assembled Luminary code against his own machine code created in an alternative way G146/MAPLD 2004

  14. Acronyms • ACA – Attitude Controller Assembly • AEA – Abort Electronics Assembly (the AGS digital computer system) • AGC – Apollo Guidance Computer (cf CMC and LGC) • AGS – Abort Guidance System – backup to PGNS to allow rendezvous • AOT – Alignment Optical Telescope • CMC – Command Module Computer • DSKY – DiSplay and KeYboard for AGC • IMU – Inertial Measurement Unit • ISS – Inertial SubSection • LGC – Lunar module Guidance Computer • PGNCS – Primary Guidance, Navigation and Control Section • PGNS – Primary Guidance and Navigation Section • RCS – Reaction Control System (on LM 16 jets arranged in two systems) • TTCA – Throttle/Translation Controller Assembly • YUL – AGC assembler (original written at Christmas) G146/MAPLD 2004

  15. References • Some resources of interest to AGC historians... • History of Recent Science and Technology - 77 documents more-or-less relating to the development of the AGC http://www.hrst.mit.edu/hrs/apollo (N.B. site is not always available) (A set of convenient indices to these documents is available at my website: http://www.cems.uwe.ac.uk/~jtwebb/agc) • Apollo Lunar Surface Journal - contains several interesting LM operational documents plus complete surface transcripts http://www.hq.nasa.gov/alsj • Eldon C. Hall, Journey to the Moon, AIAA, Reston, VA, 1996 Should be read in conjunction with: Hugh Blair-Smith, Annotations to Journey to the Moon, http://www.hrst.mit.edu/hrs/apollo/ public/blairsmith.htm G146/MAPLD 2004