Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsSpace ScienceAstronomyAmateur AstronomySpace FlightSpace StationShuttleSpace HistorySpace PolicySETI
SpaceKB.com
Contact UsLink To UsSearch & Site Map

Space Forum / Space History / July 2004



Tip: Looking for answers? Try searching our database.

Apollo LEM computer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wboas@nyx.net - 10 Jul 2004 03:33 GMT
Folks,

I'm sure this file is known to NASA veterans, but as time passes,
maybe posting it would be of interest to newcomers to USENET.

I found it about 3-4 years ago somewhere on the net.

Herewith, as I found it:

"Computers in the Apollo Program

The comp.realtime newsgroup has carried an interesting discussion of computers
used on board the Apollo Command and Lunar modules. For those of you who
haven't seen this, here's a repost of a fascinating story about these antique
machines.

by Stanley R. Mohler, Jr. Dec '94

A few months ago I posted a message in sci.space.tech seeking info on the Lunar
Module on-board computer and its software. I soon got some private e-mail from
Allan Klumpp, the principal designer of the Apollo Lunar Module on-board
descent software. He also wrote the steering system for the digital autopilot.
He invited me to call him which I did. I thought I would summarize here my
understanding of some of the fascinating info he gave me over a 1.25-hour
period.

Allan was one of about 300 people who designed the LM's software over a 7 year
period for 46 million 1967-era dollars. He did his work as a graduate student
at the MIT Draper Lab during the Apollo years.

The LM and CM had identical computers on board, each the size of a shoe box.
Each contained a total storage capacity of 36K of 14-bit words. This means
total storage was roughly equal to the 64K bytes of a Commodore-64 computer.
The LM's computer had a "memory cycle time" of 11.7 micro-seconds. However,
virtually all CPU operations required at least 2 clock cycles making the
effective memory cycle time 23.4 micro-seconds, i.e., it effectively ran at
only about 43 kHz (0.043 MHz)! Note that the original IBM PC-XT ran at 4.77
MHz, and the latest PC's run at about 66 MHz. The fastest computers today run
at about 300 MHz. The LM computer is probably comparable in speed to a pocket
calculator. Numbers were represented using 14-bit words in double-precision
(i.e., 28 bits). The 15th and 16th bit were for the sign of the number and for
parity checking (i.e., to make sure the chips were all in sync with the clock
pulses). Calculations were fixed-point (not floating-point).

The on-board program, named "LUMINARY", was stored in read-only core-rope
memory which took months to manufacture (the program fills about 10 cm of
print-out). Therefore the software had to be in final form months before
launch. LUMINARY version 99 landed Apollo 11. Version 209 was the final version.

The computer also contained a small eraseable area of about 2K 14- bit words to
temporarily store variables in. The computer was built entirely out of
integrated circuit NOR gates: one type of gate for high reliability.

Allan, his friend Don Eyles, and about 300 others wrote their programs in the
first high-order computer language, called MAC (MIT Algebraic Compiler), then
compiled it BY HAND into assembly language, which they typed onto punched cards
(there were no terminals or text editors). Incidentally, the Shuttle's software
is written in a language called HAL/S, named after Hal Lanning, the author of
MAC. HAL/S is an improved version of MAC.

The LUMINARY program consisted of many subprograms which were priority driven,
i.e., they took turns executing according to their priority. Each program would
move data in and out of the very small eraseable area of memory (2K in size).
The biggest debugging challenge was to keep programs from erasing, or
"overlaying", another program's data at inappropriate times. If too many tasks
were demanding the computer's time, it would simply delay or THROW AWAY what it
had been working on, issue an alarm, and start working on the new item.

Such frightening alarms occurred during the Apollo 11 landing (first moon
landing). If you listen to recordings of the landing, you will hear the Capcom
say "1201 alarm" and "1202 alarm." The astronauts' checklist had erroneously
called for the astronauts to turn on the rendezvous radar before initiation of
the descent. Subsequently, the program that managed the radar began demanding
too much of the computer's spare margin of time. The power supply for the radar
was not properly synchronized with the LM's main power supply. Consequently, as
the two power supplies went in and out of synchronization, the rendezvous radar
generated many spurious input signals to the LM's computer. In responding to
these signals, the computer delayed some of its guidance calculations and left
others unfinished. This situation caused the computer to issue alarms during
the landing. During a normal descent, the guidance program, which brought the
LM to its target landing site using a minimum of fuel, would issue commands
once every two seconds. Steering commands to the digital autopilot, which kept
the LM stable, were issued every 10th of a second. Although the landing, which
had an 11-minute guidance phase, was successful, a full minute's worth of
guidance commands were never issued by the computer due to rendezvous radar!

For debugging, the programmers at MIT had an IBM 360 model 175 mainframe
computer that acted as a simulator of the LM. Allan and his colleagues would
test their software in this simulator, which interfaced with their software
just as the real LM, with its associated dynamics, would. The IBM 360 produced
printed output as well as plots of the trajectories of the simulated landings.

In the real LM, the on-board computer had a digital display and a keyboard.
During landing, the computer would display a number, updated periodically. The
LM "Pilot", who was on the right and never touched the controls, would
continuously read out updated values of this number. The Commander on the left,
who was actually manipulating the controls, would find this number on a
reticule painted on the window. The target landing spot, where the computer was
trying to land, would be visible at that location out the window. The commander
would "fly" the LM by redesignating to a new landing spot by clicking a hand
controller. In this way, Neil Armstrong carefully steered the LM away from an
unexpected crater full of Volkswagen-size boulders, setting the LM down with
only 30 seconds of fuel left! One click of the hand controller would move the
landing spot by a couple of degrees. Allan chose to program in 2 degrees
left/right, and a half degree up and down (i.e., forward and backward). Later
he changed it to 1 degree both ways, at the astronauts' request. The commander
could also increase or decrease his descent rate by one foot/second by clicking
a second hand controller.

LUMINARY was never completely bug free. Allan told me about a fascinating
series of events that could have easily prevented the first moon landing and
might have caused disaster. Allan was the principal designer of the LM's
descent guidance program which steered the LM by gimballing and throttling the
descent engine. Whenever the computer commanded the engine to increase or
decrease thrust, the engine (and LM) reacted after a short time lag. Allan's
descent program needed a routine to accurately estimate the new thrust level,
which could be accomplished by reading the "delta-V" (change in velocity)
measured by the LM's accelerometers. He wrote a short routine that took into
consideration, i.e., compensated for, the engine's lag time, which TRW's
"interface control document", full of useful information for the programmers,
said was 0.3 seconds. It took 0.3 seconds for the LM's descent engine to
achieve whatever thrust level the computer might request. The final version of
the thrust routine, which was put into the LM, was written by Allan's friend
Don Eyles. Eyles was sufficiently enthusiastic about the programming challenge
that he found a way of writing it which required compensating for only 0.2 of
the 0.3 seconds. The IBM 360 simulator showed Eyles' program worked
beautifully. His routine was aboard Apollos 11 and 12 which landed
successfully. However, telemetry transmitted during the landings later showed
something to be very wrong. The engines were surging up and down in thrust
level, and were barely stable. A guy at Johnson Space Center called Allan and
informed him that the LM's engine was not a 0.3-second-lag engine after all. It
had been improved some time before Apollo 11's launch such as to lower the lag
time to only 0.075 seconds. Correction of this item in the interface control
document had simply been overlooked. Once this discrepancy was discovered, the
IBM 360 simulator was reprogrammed to properly simulate the actual, faster
engine. Running on the simulator, Don Eyle's thrust program, with the
0.2-second compensation, exhibited the surging that had occurred on the real
flights. But here's the most interesting fact: the simulator also showed that
had Allan Klumpp chose to "correct" Don Eyles' program by compensating for the
full 0.3 seconds that was printed in the document, the LM would have been
unstable and Apollo 11 would never have been able to land. By pure luck, Don
Eyles was creative enough to write the thrust routine in a way that kept the LM
just inside the stability envelope and allowed successful landings!

Allan's descent program called "P64" periodically computed a polynomial
function to describe the optimum descent trajectory. This polynomial would
smoothly merge the LM's current position and velocity vectors into the target
point position and velocity vector. The "target point" for P64 was just above
the landing point (When the LM reached the target point with a small vertical
descent rate, P64 would cease execution and the landing phase would be handled
by a program called "P66"). The computer would then make the LM fly the
trajectory, which would be recomputed every 2 seconds. An opportunity for
disaster presented itself here. Many sci.space.tech readers may know enough
mathematics to understand the undesirable "wiggles" that can be generated by
high-order polynomial curve fits. Under conceivable circumstances, the
polynomial function computed by P64 could droop down, go beneath the lunar
surface, rise out of the surface, then descend to the target point! If such a
trajectory were computed during a real landing, and the LM were allowed to
follow it, the LM would crash. There was no logic coded in to detect this
situation and prevent it. No programming solution was ever found. An example
scenario where this disaster could have happened follows. If the LM was off
course, away from the terrain model stored in the computer, and flying over a
deep crater, the landing radar would fool the computer into thinking the LM was
higher relative to the mean surface than it previously assumed. This could
cause a newly computed polynomial trajectory to "droop" down sharply,
unintentionally intersect the real lunar surface, then rise back out of the
surface, inviting the LM to crash! Allan said this problem could conceivably be
remedied by an astute astronaut retargeting the landing point beyond the fuel
range (at least for a while!).

What would the computer have done if the LM's descent engine quit cold a mile
above the moon? The computer would not have initiated any automatic solutions.
Allan said the astronauts simply would have pressed an abort button, which
would have jettisoned the descent stage and ignited the ascent engine for
return to the CM.

I would like to thank Allan Klumpp for the time he spent explaining this stuff
to me. It was absolutely fascinating to hear him talk. I hope sci.space.tech
readers have enjoyed reading my description of Allan's comments."

-eof-

Bill
wboas@nyx.net
Archibald - 10 Jul 2004 11:23 GMT
Great reading!

Thanx!
rk - 10 Jul 2004 13:14 GMT
> Great reading!
>
> Thanx!

Yes, it was.

The book to read on those computers is:

  _Journey to the Moon: The History of the Apollo Guidance Computer_
  Eldon C. Hall
  1996, ISBN 1-56347-185-X (softbound).

-and-

  "Annotations to Eldon Hall's Journey to the Moon"

  In February of 1997, Hugh Blair-Smith wrote a series of annotations
  to Eldon Hall's book about the history of the AGC.  They are
  reproduced here by kind permission of Mr Blair-Smith.

  http://hrst.mit.edu/hrs/apollo/public/blairsmith.htm

Another good source for computers in space is Jim Tomayko's book:

  _Computers in Spaceflight: The NASA Experience_

  James E. Tomayko, Wichita State University
  NASA Contractor Report CR-182505, 1988

  http://www.hq.nasa.gov/office/pao/History/computers/Compspace.html

Signature

rk, Just an OldEngineer
"Dealing properly with very rare events is one of the attributes that
distinguishes a design that is fit for safety-critical systems from one that
is not."  -- John Rushby in "A Comparison of Bus Architectures for Safety-
Critical Embedded Systems," March 2003

Peter Smith - 11 Jul 2004 02:21 GMT
rk <stellare@NOSPAMPLEASE.erols.com> wrote...

> > Great reading!
> >
[quoted text clipped - 3 lines]
>
> The book to read on those computers is:

<noted>

Some other web based resources are:

(Extract) Scan of commented assembler listing of Luminary:
http://klabs.org/richcontent/Misc_Content/AGC_And_History/luminary1.jpg
"BURNBABY"

The AGC in Wikipedia:
http://en.wikipedia.org/wiki/Apollo_Guidance_Computer

Fred Martin's recollections:
http://klabs.org/richcontent/MAPLDCon03/panel/papers/martin_1994.htm
"Cool NASA heads at MSC kept control and our most knowledgeable NASA
software engineer, Jack Garman, advised the Mission Controller to inform
the astronauts to push on. Jack was convinced, in a split second, that if
the computer wasn't getting to certain computations, such algorithms were
not essential and would not materially affect the landing. It was a gutsy
call. He was right and the LEM landed safely."

And thanks Bill for that fabulous post!

- Peter
Gene Seibel - 10 Jul 2004 17:15 GMT
Thanks much. Those were some great programmers.
--
Gene Seibel
Space Ship One - http://pad39a.com/gene/ss1.html
Because I fly, I envy no one - except Mike Melvill.

> Folks,
>
[quoted text clipped - 6 lines]
>
> "Computers in the Apollo Program
Gene Seibel - 10 Jul 2004 17:23 GMT
Interesting how they made the computers identical in the LM and
Apollo. Burt Rutan has done the same thing. The White Knight cockpit
is identical to the SpaceShip One cockpit and is used as a simulator.
http://www.scaled.com/projects/tierone/data_sheets/html/lith_white_knight_p2.htm
--
Gene Seibel
Hangar 131 - http://pad39a.com/gene/plane.html
Because I fly, I envy no one.

> Folks,
>
[quoted text clipped - 6 lines]
>
> "Computers in the Apollo Program
OM - 10 Jul 2004 21:13 GMT
>Interesting how they made the computers identical in the LM and
>Apollo. Burt Rutan has done the same thing. The White Knight cockpit
>is identical to the SpaceShip One cockpit and is used as a simulator.
>http://www.scaled.com/projects/tierone/data_sheets/html/lith_white_knight_p2.htm

...Yeah, but did they do the same with the LH canisters?

                OM

Signature

"No bastard ever won a war by dying for     | http://www.io.com/~o_m
his country. He won it by making the other | Sergeant-At-Arms
poor dumb bastard die for his country."    | Human O-Ring Society

    - General George S. Patton, Jr

rk - 12 Jul 2004 13:16 GMT
>>Interesting how they made the computers identical in the LM and
>>Apollo. Burt Rutan has done the same thing. The White Knight cockpit
[quoted text clipped - 3 lines]
>
> ...Yeah, but did they do the same with the LH canisters?

Well, MIT/IL did the guidance system for both the CM and the LEM so it makes
sense that the electronics were as similar as possible and they did have more
or less similar tasks.

Were the environmental systems for the CM and LEM designed by the same
contractor?

Anyways, one thing that is interesting is the difference between the Saturn V
launch vehicle computer and the AGC (CM, LEM), as they differed in just about
every way possible, from technology (discrete vs. microcircuit) to
architecture (serial addition vs. parallel) to ... {snip too much stuff to
write this morning}.  There were thoughts of trying to use the same computer
everywhere but that didn't fly.

Signature

rk, Just an OldEngineer
"Dealing properly with very rare events is one of the attributes that
distinguishes a design that is fit for safety-critical systems from one that
is not."  -- John Rushby in "A Comparison of Bus Architectures for Safety-
Critical Embedded Systems," March 2003

Kevin Willoughby - 13 Jul 2004 04:44 GMT
> Anyways, one thing that is interesting is the difference between the Saturn V
> launch vehicle computer and the AGC (CM, LEM), as they differed in just about
> every way possible, from technology (discrete vs. microcircuit) to
> architecture (serial addition vs. parallel) to ... {snip too much stuff to
> write this morning}.  There were thoughts of trying to use the same computer
> everywhere but that didn't fly.

Does any of that explain why the S-V guidance computer worked just fine
when the Apollo computer had been knocked sideways by lighting on Apollo
12?
Signature

Kevin Willoughby         kevinwilloughby@acm.orgNoSpam.invalid

Imagine that, a FROG ON-OFF switch, hardly the work
for test pilots. -- Mike Collins

rk - 14 Jul 2004 01:26 GMT
>> Anyways, one thing that is interesting is the difference between the
>> Saturn V launch vehicle computer and the AGC (CM, LEM), as they differed
[quoted text clipped - 6 lines]
> when the Apollo computer had been knocked sideways by lighting on Apollo
> 12?

I don't know, have no data, but I always thought about just that issue.

For example, the logic in Saturn V computer was triple modular redundant (with
error reporting circuitry they called the "disagreement detector").  They also
ran two core memories in parallel, each of which had parity, with automatic
correction by switching to the correct memory and then automatic scrubbing of
the one with the error, which was then put into backup mode.  I recall less
about the power supplies, I'd have to look it up (note weasle words) but I
believe that they were all redundant.  Note that this form of redundancy,
static redundancy, is such that the effect of a fault is masked
instantaneously.  The AGC was not built in this manner and didn't have the
redundancy and error correction, but did have some fault detection capability
built in such as the parity in the memories (16-bit physical word; 15-bit
logical word in a 1's complement format) and also the ability to detect when a
program fault caused an instruction to jump to itself.

Good question, been wondering about that myself for a number of years.

Signature

rk, Just an OldEngineer
"Dealing properly with very rare events is one of the attributes that
distinguishes a design that is fit for safety-critical systems from one that
is not."  -- John Rushby in "A Comparison of Bus Architectures for Safety-
Critical Embedded Systems," March 2003

Derek Lyons - 15 Jul 2004 18:35 GMT
>> Does any of that explain why the S-V guidance computer worked just fine
>> when the Apollo computer had been knocked sideways by lighting on Apollo
>> 12?
>
>I don't know, have no data, but I always thought about just that issue.

The explanation I heard was that the Apollo computer being in a
smaller volume and nearer the strike was exposed to higher EMF effects
than the S-V computer.

D.
Signature

Touch-twice life. Eat. Drink. Laugh.

Bruce Palmer - 15 Jul 2004 21:51 GMT
>>>Does any of that explain why the S-V guidance computer worked just fine
>>>when the Apollo computer had been knocked sideways by lighting on Apollo
[quoted text clipped - 5 lines]
> smaller volume and nearer the strike was exposed to higher EMF effects
> than the S-V computer.

Were the Saturn V guidance computers in the IU with the stable reference
platform?

Apollo 12 was struck twice by lightning ISTR.  Were the actual locations
of the lightning strikes on the vehicle documented?

Signature

bp
Proud Member of the Human O-Ring Society Since 2003

James G. Joyce - 17 Jul 2004 01:41 GMT
> >>>Does any of that explain why the S-V guidance computer worked just fine
> >>>when the Apollo computer had been knocked sideways by lighting on Apollo
[quoted text clipped - 11 lines]
> Apollo 12 was struck twice by lightning ISTR.  Were the actual locations
> of the lightning strikes on the vehicle documented?

<digs up trusty copy of Murray and Cox ...>

The way it's explained there, Apollo 12 created its own lightning ... (pp.
376-7)

" ... What they had done, they realized later, was to launch a 363-foot
lightning rod, with the equivalent of a copper wire in the form of a trail
of ionized gases running all the way to the ground. Even though there was no
lightning in the vicinity before launch, Apollo 12 could create its own. And
that is exactly what it did, discharging the cloud into which it had entered
...

"Actually, Don Arabian's anomalies team later determined that Yankee Clipper
was hit twice by lightning, once 36.5 seconds after launch at an altitude of
6,000 feet, when it discharged the cloud it was flying through, and again 16
seconds later, when it triggered a cloud-to-cloud bolt."

So it sounds like both bolts hit near the top of the stack (possibly the
LES) first. Apparently, the only physical damage that reuslted from that
60,000-plus-ampere jolt flowing through the skin of the stack was to some
external instrumentation for measuring temperatures and R.C.S. reserves. It
was the induced electromagnetic fields that knocked the fuel cells off line
and tumbled the CM's guidance platform.

And, in a footnote ...

"Part of the reason the spacecraft was so affected by the lightning while
the Saturn was not involved the spacecraft's greater exposure-it was
positioned like the tip of a lightning rod-and part of it was luck, as
Arabian emphatically pointed out ... In the case of the I.U., induced
currents reached the guidance system's circuits but the computer software
kept the platform from tumbling."

I'm guessing that, in addition to being better protected, the differences in
construction and the built-in redundancy of the guidance computers in the
I.U. (thanks, rk, for enlightening me on that with your earlier post) were
why that platform didn't tumble ... thank goodness.

Sorry for the overlong post ... now resuming normal lurking mode ...

James (who still has much to learn)
Bruce Palmer - 17 Jul 2004 02:41 GMT
> So it sounds like both bolts hit near the top of the stack (possibly the
> LES) first. Apparently, the only physical damage that reuslted from that
[quoted text clipped - 16 lines]
> I.U. (thanks, rk, for enlightening me on that with your earlier post) were
> why that platform didn't tumble ... thank goodness.

Those older gyros/resolvers/sliprings/torquers were very susceptible to
EMI and the platform wasn't redundant - there was only 1.  Sounds like
the circuitry was sufficiently robust to protect the guts of the thing.
I wonder if the ST-124 housing had its own electrical shielding.
http://history.nasa.gov/SP-4206/ch8.htm#244

> Sorry for the overlong post ... now resuming normal lurking mode ...

Not overly long at all, James, thanks for that.

Signature

bp
Proud Member of the Human O-Ring Society Since 2003

Scott Hedrick - 16 Jul 2004 00:35 GMT
> The explanation I heard was that the Apollo computer being in a
> smaller volume and nearer the strike was exposed to higher EMF effects
> than the S-V computer.

At that point, what would have happened if the escape rocket had been
ignited? Would the system have completed the sequence and cut loose the CM?
Would the rocket have been able to pull off the CM? If not, could the flight
have continued without it?
rk - 01 Aug 2004 00:41 GMT
>>> Does any of that explain why the S-V guidance computer worked just fine
>>> when the Apollo computer had been knocked sideways by lighting on Apollo
[quoted text clipped - 5 lines]
> smaller volume and nearer the strike was exposed to higher EMF effects
> than the S-V computer.

I was doing my assigned reading a few days ago when I ran into this:

  In-flight Use

  Shortly after liftoff of Apollo 12, two lightning bolts struck
  the spacecraft.  The current passed through the command module
  and induced temporary power failure in the fuel cells supplying
  power to the AGC.  During the incident the voltage fail circuits
  in the computer detected a series of power trenches and triggered
  several restarts.  The computer withstood these without
  interruption of the mission programs or loss of data.

From:

  "The Apollo Guidance Computer - A Designer's View
  Eldon Hall, Designer, Apollo Guidance Computer
  1982

Signature

rk, Just an OldEngineer
"Dealing properly with very rare events is one of the attributes that
distinguishes a design that is fit for safety-critical systems from one that
is not."  -- John Rushby in "A Comparison of Bus Architectures for Safety-
Critical Embedded Systems," March 2003

Julian Bordas - 13 Jul 2004 12:28 GMT
>>Interesting how they made the computers identical in the LM and
>>Apollo. Burt Rutan has done the same thing. The White Knight cockpit
[quoted text clipped - 4 lines]
>
>                 OM

Would that be LiOH?
OM - 13 Jul 2004 21:14 GMT
>Would that be LiOH?

...Quiet, you. You've been lurking too much to be correcting anyone
:-) :-) :-)

                OM

Signature

"No bastard ever won a war by dying for     | http://www.io.com/~o_m
his country. He won it by making the other | Sergeant-At-Arms
poor dumb bastard die for his country."    | Human O-Ring Society

    - General George S. Patton, Jr

Julian Bordas - 14 Jul 2004 11:18 GMT
>>Would that be LiOH?
>
> ...Quiet, you. You've been lurking too much to be correcting anyone
> :-) :-) :-)
>
>                 OM

Lurking, I wish. I've moved back to civilisation as I know it.

Julian
Derek Lyons - 15 Jul 2004 22:28 GMT
>Interesting how they made the computers identical in the LM and
>Apollo. Burt Rutan has done the same thing. The White Knight cockpit
>is identical to the SpaceShip One cockpit and is used as a simulator.
>http://www.scaled.com/projects/tierone/data_sheets/html/lith_white_knight_p2.htm

One wonders how effective it really is given the utter lack of
anything else common between the craft.

D.
Signature

Touch-twice life. Eat. Drink. Laugh.

Peter Smith - 23 Jul 2004 13:16 GMT
<wboas@nyx.net> wrote...

> Herewith, as I found it:
>
> "Computers in the Apollo Program
<snip fascinating quote>

Sorry to come back so late with this, but I just got the URL for those who
might be interested.  Gary Neff's site has some great Apollo stuff
including scans of the Luminary printouts.  (Among other things including
his great re-synched LM landing sequences.)
http://www.pacifier.com/~garyn/

- Peter
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.