5 AGC Origins NASA contracted MIT to develop AGC Now Charles Stark Draper LaboratoryEarly work done on Polaris ballistic missileVigorous debate on the interaction of man, spacecraft and computerAs Apollo requirements grew, computer requirement grew even more!The original AGC was to be only about 1K!
6 Early Design Issues What systems will it interface with? How much computing capacity?What type of circuit technology?Reliability and/or in-flight maintenance?What do we *need* a computer to do?What does a human interface look like?Contemporary computers (mid-1960’s)!Filled large cabinets (and rooms!)Large power and cooling requirements“User interface” was batch – cards, disks magnetic tape and paper tape“Real-Time” computers were in infancyFunctional v. Modal: Modal very well defined in task, much more automatic. Functional more general and flexible.Need to miniaturize!Early on, it was all to easy to laod the computer up with lots of nifty features – them came the big Tyndall scrub.What do we *need* it to do? Well, remember, no spacecraft up to that time had anything that would resemble a computer! Requirements were very unclear!
7 AGC Requirements Autonomously navigate from the Earth to the Moon Continuously integrate State VectorCompute navigation fixes using stars, sun and planetsAttitude control via digital autopilotLunar landing, ascent, rendezvousManually take over Saturn V booster in emergencyRemote updates from the groundReal-time information displayMultiprogrammingMultiple user interfaces (“terminals”)State Vector is the position and velocity of the vehicle – Where am I, and where am I going?The Apollo was the first to use a fully digital autopilotMultiprogramming – run 7 jobs concurrently, plus 6-8 on the waitlistReal-time info displayed at 0.5 second update intervalIf the Saturn V’s guidance computer failed, the crew could use the AGC for guidance, and could even manually “fly” the Saturn into orbit.
8 Logic Chips Fairchild introduced the “Micrologic” chip Two triple-input NOR gates per chipResistor-Transistor LogicVirtually all logic implemented using the Micrologic chipsSingle component greatly simplifies design, testingGreater production quantities -> better yields and higher qualitySeveral hundred thousand chips procured (!)Wrong to say that NASA drove the introduction of chips, and wrong to say they invented themThey (and the DOD) *DID*drive manufacturers to create themChips (as opposed to discrete components) were the only reasonable choice, given the requirements of size, power and reliability
11 AGC upper and lower trays Upper tray: Core Rope and Erasable memoryLower tray: Logic and interface modulesNote “logic sticks” in rows on lower traySimilar form factor used in memory trayUpper tray also held core rope plugable modules (show core rope module)
12 AGC Hardware 36K (16-bit) words ROM (core rope) 2K (16-bit) words RAM Instructions average microseconds1 ft3, 70 pounds, 55 watts41 “Normal” and “Extended” instructions6 “Involuntary” instructionsNormal instructions are things like load/add/store, compare, branch, move“Involuntary” instructions are counter instructions and interruptsI/O instructions are really simple load/store to specific memory addressesApproximately 40,000 instructions/second
13 AGC Internal Architecture RegistersThe usual suspects: Accumulator, program counter, memory bank, return address, etc.Input/output channelsData uplink / downlinkNo index register or serialization instructions (!)Interrupt logic and program alarmsOne’s complement, “fractional” representationOn a high level, architecture is rather standardIndex register is implemented in for interpretive instructions
14 Instruction Set The usual suspects – 41 instructions 3 bit opcode, plus (sometimes) two bit “quarter code”, plus “Extend” mode, plus….“Interpreted” instructions“Virtual machine” implemented within AGCCoded in Polish NotationSimilar to “p-code”Trigonometric, matrix, double/triple precision*Huge* coding efficiencyUsual suspects: Load, compare, arithmetic, branchQuarter codes used when operand was in erasable memory“Extend” instruction almost doubled the number of instructionsExtended – Used prior TC 6 instruction to define them“Implied” instructions – address defined special operationsInterpreted instructions defined as macros, had parameter lists, etc”If anyone creates an instruction set like this again, they should be fired….Polish Notation- Prefix notation - +, 3, 4Reverse Polish Notation - Postfix notation - 3, 4, +No parenthesis required (zero address?)
15 Instruction Set 7 I/O – read/write instructions to I/O channels 6 Involuntary instructions - countersExample: Update from Inertial Measurement UnitCounters represent accelerometer and gimbal changesNo context switch!Currently running program *NOT* interruptedCounters updated directly by hardwareProcessing resumes after involuntary instruction (counter update) finishesProcessing delayed only about 20 microsecondsCounter for gimbal might be 1/128 of a degree, for an accelerometer it might be .01 foot/second/secondRemind audience that we will be getting back to counter instructions at the end (Apollo 11)
16 Memory Architecture All memory 16 bit words Read/Write memory 14 bits data, 1 bit sign, 1 bit parityNot byte addressableRead/Write memoryConventional coincident-current core memory2K wordsRead Only Core “Ropes”36K Read-only storageContained all programming and some data
17 Memory Architecture Read-only Core “Ropes” Each core reused 24 times for each bit (!)High storage densitySoftware “manufactured” into the ropesSoftware frozen 10 months before launch!Ropes installed in spacecraft 3-4 months prior to launch6 rope modules, each 6K x 16 bits of memoryName came from prototypes which were laid out in linear “string”Select, sense, inhibit lines “woven” into coresHuge time between software “freeze” and launch eliminated chance to add last minute “changes”Software had to be qualified long before a flightBugs found after manufacture addressed with procedural changes!
20 Addressing memory Instruction has 8 to 12 bits for addressing Not enough bits! (need at least 16 bits -> 64k)Torturous memory bank addressing“Banks” are either 1K or 256 wordsThree banking registers required to address a specific memory locationLots of extra code needed to manage memory banksAnother case of trying to gradually extend a limited architecture
21 Interfaces (“I/O Devices”) Gyroscopes and accelerometersCollectively known as the “IMU” (Inertial Measurement Unit)OpticsSextants and telescopes used for navigations sightingsRadars and ranging equipment2 radars on LM, VHF ranging on CSMDisplay and Keyboards (DSKY’s); 2 in CM, 1 in LMEnginesCSM: SPS, LM: DPS, APSBoth have 16 attitude control thrusters, CM has additional 12 for reentryAnalog Displays“8-Balls”, altitude, range, rate displaysAbort buttons (!)No external storage (disk, tape)
22 Man-Machine Interactions Hasn’t changed in 50+ yearsMachine instructionsOpcode - OperandsCommand line interfaceCommand - OptionsEven WIMP’s use similar philosophy!All define an object, and the action to be performed on that objectWIMP: Windows, Icons, Menus and Pointers.Note the word object here has nothing to do with OOP.
23 Using the DSKY interface DSKY – Display and KeyboardThree “registers” displayed dataCommands entered in “Verb-Noun” format“Verb”: Action to be takenDisplay/update data, change program, alter a function“Noun”: Data that Verbs acts uponVelocities, angles, times, rates
24 DSKY – Display Keyboard Note – Older picture – has STBY instead of PRO key.Give hints of things to come with Prog, verb, noun registers, and the display registers – we WILL learn how to use it!
27 Sample DSKY QueryPrograms, Verbs and Nouns referred to by their “number”Lots to remember:~45 Programs, 80 verbs, 90 NounsExample: Display time of the next engine burnEnter Verb, 06, Noun, 33, EnterVerb 06: Display Decimal DataNoun 33: Time of IgnitionEnd with pressing EnterNotation: V06N33ECrews memorized many of the computer programs, nouns and verbsChecklists usually provides all the key entries (and background info) that are needed
28 Sample DSKY Query: Time of Engine Ignition Verb 06, Noun 33: Display Time of IgnitionVerb 06: Display valuesProgram number – P63Noun 33: Time of IgnitionHoursMinutesSeconds . hundredthsTime of Ignition: 104:30:10.94 (Mission time)
29 AGC ExecutiveMultiprogramming, priority scheduled, interrupt driven, real-time operating systemCooperative multitasking used to dispatch jobsSeveral jobs running at one timeUp to seven “long running” jobsOne short, time dependent task, with six queuedOnly one program has control of the DSKY
30 Scheduling a New JobStarting a program requires temporary storage be allocatedTwo types of storage areas availableCORE SET: 12 wordsPriority, return address and temp storageAlways requiredVAC Area: 44 wordsRequested if vector arithmetic is used7 CORE SET’s and 7 VAC Areas availableTemp storage used for variablesThe number of CORE SET’s and VAC areas will become important later on….Executive functions: FINDVAC, NOVAC, Change job, End of job, Job Sleep,Priority Change, Dummy job, Wake job.
31 Scheduling a New Job All work assigned a priority Executive selects job with highest priority to runDSKY always the highest priorityEvery 20 milliseconds, job queue checked for highest priority taskJobs are expected to run quickly, and then finish“Night Watchman” verifies job is not looping, and new work is being scheduled (every .67 seconds)Restart forced if a job is hung upNight Watchman forces a restart if jobs are looping, or if a new job is not scheduled within 1.28 secondsRefer to “PINBALL – Buttons and lights” DSKY handling routine.Restart: All data is saved, all processes terminated and rescheduled from their restart point
32 Error Messages Errors need to be communicated to crew directly Software might encounter errors or crashCrew may give computer bad data or task“Program Alarm” issued, w/error light onVerb and Noun code indicate type of errorDepending on severity of error, may have to force a computer restartAn algorithm is not converging correctly, a star number might not be in the catalog, etc
33 Error Recovery All programs resister a restart address Program errors, hung jobs, resource shortages can all force a computer restartA “restart” is the preferred recoveryNOT the same as rebootingAll critical data is saved, jobs terminatedAll engines and thrusters are turned off (most cases)Programs are reentered at predefined restart pointProcess takes only a few seconds!All engines except in one case, when the LM ascent engine is running
34 Landing on the moon One attempt, no second approaches! AGC handles all guidance and controlThree phasesBraking (Program 63)Started ~240 nm uprange at 50K feetApproach (Program 64)2-3 nm uprange, begins at ~7K feetFinal Descent (Program 66)Manual descent, started between 1000 to 500 feet
35 Lunar Module Descent Profile Braking Phase: Program 63Approach Phase:Program 64Terminal Descent: Program 66
36 Program 63: Lunar descent Started minutes before descentComputes landing site targetingStarted with V37E63EResponse V06N61Time until end of P63Time from ignitionCrossrange distanceLots of computer entries, but the ones I’ll talk about give a good idea with out bogging down into operational procedures too much.
38 P63 – Braking phase (Confirm Engine Ignition) T-35 Seconds, DSKY Blanks for 5 seconds, at T-5, Flashing Verb 99 displayedVerb 99: Please enable Engine IgnitionProgram number – P63Noun 62: Pre-ignition monitorCurrent VelocityNote velocity is xxxx.x feet / second – about a mile per secondNo delta-V accumulated – the engine isn’t on!Time to ignition (min, sec)Delta V accumulated3 seconds until ignition! Press PRO[ceed]
39 P63 – Monitoring the descent Antenna angle% FuelComputer displays were compared against a “cheat sheet”Velcro’d onto the instrument panelTime from IgnitionLM Pitch angle
40 Approach – P64! Pitch over the LM to see the landing site Program 64 automatically selected by P63~7,000 feet high, 2 miles from landing siteKey PRO to accept and continue!P64 displays V06, Noun 64Time to go, Descent angle, rate, altitudeAnother cheat sheet velcro’ed to the panel
41 P64 – Approach phase of landing Program 64 automatically entered from P63Verb 06: Display valuesProgram number – P64Noun 64: Descent monitorSeconds until end of P64, andLanding point targeting angleAltitude rateAltitude
42 P66: Terminal Descent Final phase – only hundreds of feet high Less than one minute to landingComputer no longer providing targetingMaintains attitude set by CommanderCommanders attention is focused “outside” the spacecraftOther astronaut reads off DSKY displaysUp until this point, the computer has done all the flying
43 P66 – Terminal Descent Phase (manual control) Program 66 entered using usually through cockpit switchesVerb 06: Display valuesProgram number – P66Noun 60: Terminal Descent monitorForward VelocityNote the need to know where the decimal points go! Forward Velocity is 31.2 feet/sec, altitude rate is 29.6 feet/sec, altitude is feetAltitude rateAltitude
44 Apollo 11 Alarms During Landing During landing, several program alarms occurredAborting the landing was a real possibility!“Hot I/O” put CPU to 100% utilizationUnexpected counter interrupts from rendezvous radarJobs could not complete in time and free up temporary storage“1201”, “1202” alarms: No more CORE SET or VAC areas -> Restart!Guidance, navigation and targeting data preservedRestart completed within secondsComputer functioned exactly as it was designed!Often said that Apollo 11’s computer “failed” during landing – Not true!Last minute procedure change left rendezvous radar partially configuredRadar was sending data, computer didn’t know what to do with it, and it took cycles away from the main tasksRestarts demonstrated that the computer could experience a failure (running out of memory), and still safely and successfully perform the mission.
45 Abort! (A bad day at work….) Pressing the Abortbutton automaticallyswitches software toAbort program
46 Apollo 14 Abort Switch Loose solder ball in Abort switch If set, will abort landing attempt when lunar descent is begunDetected shortly before descent was to beginNeed to ignore switch, but still maintain full abort capabilityPatch developed to bypass abort switchDiagnosed, written, keyed in by hand and tested in less than two hours !!Two hours! Try to get that out your software vendors!The lesson here is that despite all programming being in ROM, facilities existed to perform “erasable memory programs”, i.e. patches, where necessary.
47 Epilogue AGC was “bleeding edge” technology By the end of Apollo, hopelessly outdatedStill, it never failed!Moral #1: You can never, ever test enoughMoral #2: Requirements will always growMoral #3: Always design for the future!In 10 years of Apollo, design was never updatedDesign
48 Shameless Endorsements The Apollo Lunar Surface JournalThe Apollo Flight JournalJourney to the Moon, Eldon Hall, AIAA PressCradle of Aviation MuseumUniondale, Long Island