skip to main content

You Are Here: Home / Learning / Science, Technology & Nature / Blog / Author: Mike Richards
 
Science, technology and nature

Science, Technology & Nature Blog by Mike Richards

A fatal bug? Did computers cause the Air France disaster?

Posted on 06/07/09 by Mike Richards

 
Airbus 330 flying overhead [image by husseinabdallah, some rights reserved]
Airbus 330 flying overhead.
[image by Abdallahh,
some rights reserved
]

On June 1st, an Air France Airbus A330 on a routine flight from Rio de Janeiro to Paris crashed into the Atlantic Ocean. 228 people died in the worst air accident in French aviation history. The disaster was all the more shocking because one of the world's most reputable airlines had lost one of the most reliable airliners ever built. Until the crash of Air France 447, some 600 A330s had flown for sixteen years without a single fatality.  The aircraft crashed in an area of the Atlantic up to 3 kilometres deep leaving little evidence apart from a small amount of floating wreckage and some bodies.  The crucial flight recorders (often called the black boxes) now lie on the ocean floor and have not been recovered.

One month later, France's air accident authority, the Bureau d'Enquêtes et d'Analyses pour la Sécurité de l'Aviation Civile, released an interim report based on what little was known; the aircraft had hit the water intact at high speed in a steep dive and showed no sign of fire or explosion. This interim report stated:

"At this stage of the investigation, the only established facts are:

  • the presence near the airplane’s planned route over the Atlantic of significant convective cells typical of the equatorial regions;
  • based on the analysis of the automatic messages broadcast by the plane, there are inconsistencies between the various speeds measured."

Over a five minute period, the aircraft's computers began to report a series of equipment failures that began in the vital airspeed sensors which are necessary to keep the aircraft in stable flight.

Over a five minute period, the aircraft's computers began to report a series of equipment failures that began in the vital airspeed sensors which are necessary to keep the aircraft in stable flight.

Our knowledge of the last few minutes of the AF447 comes from automated messages radioed back to Air France's maintenance facilities using a system known as the Aircraft Communication Addressing and Reporting System (ACARS). Over a five minute period, the aircraft's computers began to report a series of equipment failures that began in the vital airspeed sensors which are necessary to keep the aircraft in stable flight. At the time, AF447 was flying through a series of intense tropical thunderstorms; it would have flown through lightning and extreme turbulence and may have also encountered freezing conditions. In themselves, these should not have caused the loss of a modern airliner. A number of other aircraft safely threaded through the same storms that night without serious incident.

In the absence of a clear cause, some reporters and bloggers have begun to blame the disaster on the use by Airbus of computerised, "fly-by-wire" technology. It has been suggested that the computers on the aircraft, if they did not actually cause the accident, may have made it impossible for the crew to avoid disaster.

How aircraft are manoeuvred

So, before we have a look at why aircraft use computers and what they do, perhaps a small diversion is in order. Airplanes manoeuvre using a combination of "control surfaces" - sometimes (incorrectly) called flaps - located on the wings and tail. You've probably seen these devices working during take-off and landing. The outer parts of the wings contain the ailerons controlling the amount of roll (or banking) used to turn the aircraft on to another heading. The horizontal surfaces in the tail are called elevators and are used to change the pitch - the nose-up or nose down attitude of the aircraft when it changes height. The vertical surface on the tail is known as the rudder and is also used to turn the aircraft, this time without the sometimes disconcerting tilt of banking. The aircraft wings also contain the flaps which are used during take-off and landing to provide additional lift or drag.

The control surfaces are driven from the cockpit. In very small aircraft this can be achieved using manual linkages not too different from the brake cables found on bicycles. When the pilot moves the joystick, it directly pulls or slackens a cable, the other end of which is attached to a control surface. However, as planes become larger and faster, the amount of force needed to move the ever-larger control surfaces becomes greater and greater, until it is not physically possible to move them at all.

During the 1950s and 1960s aircraft designers increasingly switched to hydraulic linkages similar to those found in cars. In these more modern aircraft, movements of the joystick were transferred to the control surfaces through pressurised hydraulic fluid. Pilots did not need to be especially strong, the hydraulics did all the work. The weakness of hydraulic systems is that the plane needs to be threaded with pipes which must be regularly inspected for defects; a leak could result in disaster. To reduce the risk of any one system failing, the hydraulic system was duplicated - each control surface could be moved by any one of three (sometimes four) independent hydraulic circuits; the hydraulics were said to be multiply redundant. There are only a very few cases where all of an aircraft's hydraulics have failed in-flight, and the technology continues to be used on many modern aircraft.

The weakness of hydraulics is that they are heavy and maintenance intensive. If reliance on them could be reduced, or dispensed with entirely, aircraft could carry a more useful payload and spend longer in the air - both of which make them more profitable. Fly-by-wire is the solution to this; the long, complex hydraulic links between the joystick and the control surfaces are replaced by sensors and electrical cabling. When the joystick is moved, sensors read the changes and send electrical signals to hydraulic pumps located near the control surfaces. These pumps then move the surfaces as if they were directly linked to the joystick. Fly-by-wire technology was developed in the UK and US during the 1960s for military aircraft and received its first commercial use inside the Anglo-French Concorde in 1969, but it was not especially well known until Airbus chose the technology for the A320, unveiled in 1987.

The A320 revolution
Airbus had been founded for political motives with the intention of combining the expertise of various European airspace manufacturers to build a rival to the American airline industry, dominated by Boeing and MacDonell Douglas (now part of Boeing). Although Europe, and especially Britain, had led the world in developing airliner technology throughout the 1950s and 1960s, it had been the Americans who had gone on to dominate the World market for airliners. Airbus' first airliner, the A300, had become a successful twin-engined plane but had used relatively conventional technologies; the A320 would be a huge leap into the future. It was designed to compete both with the world's best-selling airliner, the Boeing 737, and also to replace the older, thirstier, noisier 3-engined Boeing 727.

The A320 was a revolutionary aircraft, not only including fly-by-wire technology, but also being one of the first airliners to be built using substantial amounts of composite materials such as carbon fibre. Its cockpit was equally novel; there would only be two flight crew - the engineer was no longer needed, their role being taken by a highly automated "glass cockpit" that replaced switches and dials with computer screens. Aggressively marketed, the economical A320 family of jets has sold nearly 4000 aircraft, making it the second most successful airliner in the world, and is likely to be built for many years yet. The success of the A320 allowed Airbus to plan even more ambitious aircraft including the twin-engined A330, the four-engined A340 and the enormous A380 double-decked super Jumbo which entered service in late 2007. This family of aircraft has allowed Airbus to rival, and sometimes supplant, Boeing as the world's largest manufacturer of airliners - much to that company's disgust.

Interior of Airbus A340 cockpit [image by Storm Crypt, some rights reserved]
Interior of Airbus A340 cockpit.
[image by Storm Crypt,
some rights reserved
]

As well as emphasising the comfort, reliability and economy of their aircraft, Airbus have been keen to stress their exceptional safety, made possible by computer technology. Airbus took a decision that computer technology could be used to protect the aircraft from any action by the pilots that could damage or destroy it. The safe operation of an aircraft is constrained by a "flight envelope" which describes factors such as the maximum and minimum speeds, the tightest turn it can make and so on. If an aircraft exceeds its flight envelope it can result in injury to the passengers, damage to the airframe or a complete structural failure. The flight envelope is not a simple, static object; rather it changes on a number of factors such as the altitude. In theory, a computer can ensure that the aircraft remains safely inside the envelope at all times - the aircraft is said to have "flight envelope protection". The consequence of flight envelope protection is profound; the pilot no longer has absolute control of the aircraft; the computer will veto any action that would take the aircraft outside of the flight envelope.

But, before protection can be guaranteed, it is crucial that the computers are completely reliable and accurate.

Reliable computers
The Airbus contains five main computers divided into two main roles. Three of the computers are designated the primary flight control computers and are in day-to-day control of the plane; reading the pilot's instructions, monitoring the aircraft's position, speed and attitude; making the necessary calculations to keep the aircraft safe, and sending commands to the engines and control surfaces. These are backed up by a pair of secondary flight control computers which are constantly monitoring the aircraft, but only act if one or all of the primary flight control computers become unavailable. These computers are distributed around the fuselage so that an impact or hull breach should not disable more than one machine. Likewise, multiple cables link the computers - cutting one, or some of them, will not disable the entire system

In normal use, the computers each read the data from the pilot and sensors built into the aircraft and individually calculate the appropriate response. At preset intervals the responses from each computer are compared. If the result from one computer differs from the other two, it is automatically disqualified from further operation and a backup computer is switched in to make further decisions. Likewise, if one of the computers fails to respond in time for one of these votes, it is disconnected and a replacement called in. In fact, the aircraft can be safely flown and landed using only one computer, so there is massive redundancy built into the computer systems.

The designers of the Airbus computers went to enormous trouble trying to imagine all of the possible problems that could occur. Their first problem was the certainty that computer hardware and software is almost never completely free of bugs that could cause a program to crash and the to computer become unavailable. Therefore the primary and secondary flight computers not only come from different companies, but they must contain different components - so a hardware failure should not spread between the two computer systems. This diversity is replicated inside the software; with the primary and secondary computers each running different programs coded in different languages. These programs were developed by teams with exceptional records of producing high-quality software, using special software tools that should capture bugs long before the programs are ever used in real life.

Airbus's designers then went on to consider what would happen if the aircraft hit trouble - such as some of the vital sensors became unavailable. Just like Isaac Asimov's robots, Airbus aircraft are governed by three Laws.

The designers of the Airbus computers went to enormous trouble trying to imagine all of the possible problems that could occur.

The first is called Normal Law and applies when the aircraft and its systems are healthy. The flight control computers interpret the commands from the joystick and guarantee that the aircraft remains safely within the flight envelope; they also ensure that passengers remain comfortable by reducing the rate of changes in direction or altitude.

If some of the sensors fail, the hydraulics become unreliable or more than two computers are unavailable, the computers switch to Alternate Law. Here some of the protections are removed or relaxed, the aircraft can make more extreme manoeuvres but cannot exceed its flight envelope. This might sound counter-intuitive, you may be thinking this is the sort of circumstance where the pilots need more help from the computers; but Airbus' thinking was that, if the sensors or computers could no longer be trusted to read or interpret data correctly, then it was time to pass more control to the expertise of the pilots.

Further failures would force the aircraft into Direct Law. At this point the aircraft can no longer offer flight envelope protection and the Airbus must be flown like an older generation aircraft.

In the event of a catastrophic failure resulting in the total loss of power, the Airbus has a further mechanical backup mode which could be used to make an emergency landing, but would most likely be used for a few minutes whilst the flight crew tried to recover power. This is extremely unlikely to happen as the aircraft would have to lose both engines, the auxiliary power unit in the tail, have flat batteries and not be able to deploy the ram air turbine (a wind generator which can be swung out from the underside of the aircraft).

Wheels of Boeing777 [image by Diorama Sky, some rights reserved]
Wheels of Boeing777.
[image by Diorama Sky,
some rights reserved]

Flight envelope protection became a huge difference in philosophy between Airbus and its rival, Boeing. The American company was reluctant to remove ultimate control from the human and could cite a number of instances where an aircraft was only saved by exceeding the flight envelope. In 1985 a China Airlines Boeing 747 flying between Taiwan and the United States suffered a relatively minor engine failure over the Pacific. The crew did not follow the proper procedures for restarting the engine and the aircraft eventually tipped into a vertical dive. Disaster was only avoided when the pilot forced the nose up using the elevators. The aircraft vastly exceeded its envelope and suffered severe damage to its control surfaces and undercarriage but it was able to land safely with only two injuries. Airbus countered that such incidents were exceptionally rare and, besides, flight envelope protection would have ensured the aircraft never entered the dive in the first place.

Did the computers have anything to do with the loss of AF447?
The ACARS data sent back to Air France during the last few minutes show that the airspeed sensors mounted on the aircraft were registering as faulty. Following incidents on other Air France A330 and A340 airliners, the company had entered into discussions with Airbus, who had determined that certain sensor designs were prone to becoming clogged with ice or water and recommended that they be replaced as part of scheduled maintenance. Although the aircraft had not received the improved sensors, it had been declared safe to fly, but it is entirely possible that the airspeed sensors had developed a fault. As soon as the computers realised the airspeed readings from the sensors could not be trusted, they switched to Alternate Law, disengaged the autopilot and switched off the automated thrust systems. The computers would continue to keep the aircraft within the flight envelope, but the crew would be in charge of steering and maintaining the correct airspeed. The very last minute of the ACARS data suggests that the problems had continued to spread through the computerised systems responsible for maintaining the aircraft's speed and orientation. The very last message warned that the Airbus had entered a steep descent. Crucially, the data does not suggest that the computers had ever entered Direct Mode or indeed failed all together. The evidence is that the computers were battling to keep the aircraft in the air until disaster was unavoidable - they were working.

Previously, in 2008, an A330 belonging to the Australian operator Qantas experienced an in-flight emergency when one of the computers used to collate sensor data developed a serious fault which resulted in unexpected violent pitching and false stall and overspeed warnings. Fortunately, the computer was deactivated, but not before 115 people on board were injured. Airbus revised their instructions to pilots on how to deal with such an incident which proved useful less than three months later when a second Qantas A330 flying in the same area encountered a similar fault with the same computer in a different aircraft; fortunately, this time, no one was injured. Airbus and the computer's manufacturer are still trying to ascertain the exact cause of the problems but pilots have blamed radio interference from a powerful naval transmitter in Western Australia. Could a similar problem have befallen AF447? It is possible, but Airbus point out that the doomed aircraft used different computer hardware and software from the Qantas jets and it is extremely unlikely a similar bug could exist in both sets of equipment.

It is not impossible, but increasingly unlikely, that AF447's flight recorders will be recovered from the floor of the Atlantic Ocean. If they are found, air accident investigators will be able to examine the operation of the airliner's computers and sensors on a second-by-second basis and listen to the words of the flight crew. If they are not located, then we might never know precisely what happened on the flight. Instead, Airbus and the French authorities will have to make a reasoned judgement on what might have occurred and make recommendations to avoid their recurrence. Even before any report, Air France has replaced all of the airspeed sensors on its A330 and A340 aircraft.

The most likely explanation for the loss of AF447 lies with the failure of those airspeed sensors. If an airliner loses too much airspeed it loses the lift necessary to keep it in the air; it is said to have entered an aerodynamic stall. Stalling can also be brought about by sudden rises in the temperature of the air and by banking the wings. Pilots are trained both to recognise the potential for stalls and to recover from, them. But perhaps the crew of AF447 were overwhelmed by a series of events that began with what should have been a routine sensor failure. As they responded to the imposition of Alternate Law and their new responsibilities for maintaining the aircraft's speed, they would also have been quieting the various alerts appearing on their screens and fighting the storm. This would not have been the first time humans were unable to keep up with a computer in an emergency; the operators of the Three Mile Island nuclear power station in the United States were overwhelmed by so many alarms that they failed to identify a relatively minor problem that could have been easily fixed before it became a near disaster. Even now, Airbus will be examining how air crew are alerted to problems and determining if these might make circumstances worse rather than better.

...flying is still statistically safer than the drive to the airport.

Although much ink and vitriol has been spilled by supporters and detractors of Airbus' highly automated airliners; the accident records for aircraft with flight envelope protection are quite clear. Whilst highly automated aircraft  show improved performance and reliability and economics, they are neither more nor less likely to be involved in an accident. So perhaps it is the economic benefits that drive this technology. Even Boeing, so long a sceptic over fly-by-wire and envelope protection, is adopting it for the Boeing 777 and 787 Dreamliner airliners.

The statistics are also clear; modern aircraft are much safer than those of previous generations and flying is still statistically safer than the drive to the airport.

Find out more

Follow the unravelling of other disaster stories with forensic engineering:
Collapse at Kinzua
Silver Bridge
Tay Bridge
Concorde

Images

The images used in this blog are copyright. All are from flickr.com under the following creative commons licenses:

Airbus A330 flying overhead by Abdallahh - Attribution
Interior of Airbus A340 cockpit by Storm Crypt - Attribution/Non-Commercial/No Derivative Works
Wheels of Boeing777 by Diorama Sky - Attribution/Non-Commercial/No Derivative Works

 
Mike Richards

About the author

Mike Richards joined the Open University in 1996 to help trial teaching over the Internet. Since then he has taught courses ranging from an introduction to robots to the engineering works of Leonardo da Vinci; but has spent most of his time writing about security - everything from the Enigma machines to e-shopping. He is currently working on a new course exploring the world of ubiquitous computers; imagine a world where computers so small and cheap they can be put in everyday objects - smartphones today, smartclothes tomorrow.

Subscribe to Mike Richards's posts

 

Bookmark with:

  • del.icio.us
  • Digg
  • Facebook
  • Newsvine
  • NowPublic
  • Reddit
  • Stumbleupon
Please wait while loading. You must have JavaScript enabled to view star ratings.
 

Piracy is definitely illegal

Posted on 22/04/09 by Mike Richards

 

Sort of.

In Sweden.

For now.

Friday saw the long-awaited verdict in the trial of the founders of the Pirate Bay, one of the most famous (or indeed, infamous) sites on the Internet. A Stockholm tingsrätt (district court) had accused the Pirate Bay of aiding copyright infringements of materials such as movies, music and books. The four defendants, Fredrik Neij, Gottfrid Svartholm Warg, Peter Sunde and Carl Lundström, were each sentenced to one year in prison and ordered to pay 30 million kronor (£2.4 million) in damages. The case will now go to appeal and may be overturned, but it does mark a significant point in the battle against Internet piracy.

The Pirate Bay was set up by the four Swedes in 2003 as part of Piratbyrån (The Piracy Bureau), an organisation opposed to the current implementation of intellectual property rights. The Pirate Bay became a stand-alone organisation in 2004 and quickly became one of the most important centres for pirated material. By late 2008 it was servicing over 25 million unique computers, and had more than 3.5 million registered users (and many more unregistered users).

Detached ethernet cable [image © copyright Photos.com]
Detached ethernet cable [image © copyright Photos.com]

The Pirate Bay had previously run foul of Swedish authorities; a police raid in 2006 temporarily took the site offline. A series of controversies not directly related to piracy followed. In one case, confidential photographs of a child murder victim were placed on the site and, despite pleas from the police and the family, were not removed; in another, one of the Pirate Bay’s original funders was revealed to have links to the Swedish far-right.

Despite these set-backs, the Pirate Bay has continued to grow until it now sits comfortably amongst the most visited sites on the Internet. It even spawned a new Swedish political party, Piratpartiet, dedicated to reforming intellectual copyright in Sweden. Although Piratpartiet has had little direct effect on Swedish politics, it can probably be credited with changing attitudes towards file sharing inside the mainstream political parties. Pirate Bay’s influence is so undeniable that its existence became something of a political embarrassment for the Swedish government, who were committed to bringing Swedish intellectual property laws into line with the rest of the EU and with the United States. Eventually, prosecutors tasked with reviewing evidence seized during the 2006 police raid filed charges against four named individuals; not for piracy, but for aiding it. Why not charge the four with piracy?

Because, believe it or not, the Pirate Bay doesn’t hold any pirated material.

The key to the Pirate Bay’s success is a method (protocol) of distributing files known as BitTorrent. Perhaps confusingly, BitTorrent is the name of the company founded by its creator, Bram Cohen, as well as the name for the protocol that is used by a large number of other programs. In this discussion we will be concerned with the workings of the general BitTorrent system.

 

Lady using a computer [image © copyright Photos.com]
Lady using a computer
[image © copyright Photos.com]

We’re going to need two Internet users, Alice and Bob. If Alice wishes to distribute a file through BitTorrent, she needs to create a seed file, known as a torrent. Alice uses software distributed with her BitTorrent client to break the single, large file into many smaller chunks (ranging from 64kb to 4Mb in size). The same software then uniquely labels each of the chunks, using a mathematical technique known as cryptographic hashing which allows other BitTorrent client programs to correctly recognise them.

 

Finally, the list of hashes, as well as other information, such as the name of the uploader, the name of the album or movie, the artists and so on, are written to a torrent file, which is itself only a few kilobytes in size and can easily be distributed using email or the Web.  Alice publishes the torrent, (she is said to "seed" it), so it can be picked up by other BitTorrent users.

When Bob wants to download Alice’s file he first obtains a copy of the torrent. This is not difficult to do. There are many sites (of which Pirate Bay is just one) dedicated to holding copies of torrent files; and most search engines will also turn up torrent files in their results. Chances are, if you look for a movie or DVD online, at least one torrent file will be listed in the results.

Man using a laptop [image © copyright Photos.com]
Man using a laptop
[image © copyright Photos.com]

Once Bob has a copy of the torrent, he loads it into his BitTorrent client program. Bob’s client extracts a complete list of all the unique identifiers for the chunks - it only needs to find the chunks themselves. Bob’s machine does this by contacting another BitTorrent client, known as the tracker. This client holds a record of the Internet addresses of all the clients currently sharing the requested file. If Bob is the first person to download the torrent, then the tracker will be on Alice’s machine along with all of the chunks. If the torrent has spread more widely, Bob’s client will receive several, even hundreds of addresses. Bob’s BitTorrent client then makes direct links to a number of these clients and begins downloading random chunks of the whole file. When it has finished downloading a chunk, Bob’s client makes a request for the addresses of further chunks and so on until it has received all the chunks; at which point it assembles the chunks back into a perfect copy of the original document.

In a BitTorrent system, Bob is not merely a downloader, his client is also uploading chunks to other users. Each time Bob downloads a chunk, his client informs the tracker of the identity of the chunk and Bob’s address and will provide it to other users in the system. As more and more users join a BitTorrent network, the average speed of sharing files increases, making it a very efficient way of sharing files. Popular files are shared more quickly, whilst even unpopular files will exist on enough computers to allow them to spread. BitTorrent is also extremely resilient. In a normal download service, if a computer fails, it can prevent anyone from accessing files. In BitTorrent, hundreds of users can go offline and the files will continue to download, albeit at a slower speed.

BitTorrent has proved to be a very controversial technology and has had a profound effect on how the internet is used. A survey, conducted in late 2007, estimated that the BitTorrent protocol consumed the largest share of internet capacity, ranging from 49 per cent of all traffic in the Middle East, to 84 per cent in Eastern Europe; rising to an astounding 95 per cent of all traffic at night! BitTorrent has become by far the most important technique for sharing pirated materials, so much so that many ISPs have started to identify BitTorrent users and to restrict their service, or terminate their connections. However, BitTorrent has many legitimate uses, including:

  • software upgrades and bug fixes for online video games;
  • Internet storage services that make files available to large numbers of users;
  • obtaining legitimate movies and music through Bram Cohen’s BitTorrent Inc.

The Pirate Bay is a giant index of torrent files and trackers. Users only connect to the Pirate Bay to download a copy of the torrent file, or to use one of its trackers. None of the copyrighted material is actually distributed by, or passes through, the Pirate Bay servers.

So has the trial changed anything? It has clarified the law in Sweden to some extent (subject to an inevitable appeal which may drag on for years), but it certainly hasn’t put the Pirate Bay out of business. At the time of writing, the site was still working as normal, and it is unlikely to close any time soon. Following the 2006 raid, the Pirate Bay moved many of its servers away from Sweden to countries with less-stringent intellectual property right laws. But, even if the Pirate Bay were to close, it seems inevitable that other sites will spring up around the world to replace it. Piracy is a huge problem for the media industry and it can’t be resolved by ever more stringent laws, such as those proposed (and rejected) in France which would have struck downloaders off the Internet. The trial has not clarified why people pirate content.

A man's hands touching a laptop [image © copyright Photos.com]
A man's hands touching a laptop
[image © copyright Photos.com]

A few people will pirate anything, no matter how cheap the original item; there's probably nothing short of legal action that can dissuade them. A good number of people pirate material that is no longer available - either because the original has been withdrawn from sale, or was never available in their part of the world. Better distribution and back catalogues would bring these people back into the legitimate realm. Some pirate because they own a version of a title on one format and resent having to buy it again when technologies change or the original wears out. This is a more complex field as it requires governments to change the law so that copying from one form to another is legalised, and it requires media companies to unlock their content to make it possible without specialist skills.

If the media industry is to survive, it must first of all accept there will always be a certain level of piracy that cannot be eliminated; but it must make its own offerings so attractive that most people will be willing to spend money for entertainment. A good example is the Apple iTunes Store. All of the music on that site can surely be found on the Internet, but those illegal copies are of variable quality, hard to find and have a certain stigma attached to them. By making the iTunes site so easy to use, relatively cheap, and unrestricted (so far as most users are concerned), Apple and the music companies have been able to convince users to pay for more than six billion songs in five years. Other online music stores, especially those that sell unrestricted content such as Amazon, are seeing similar growth in sales.

The evidence is clear – make it cheap, make it easy, don’t upset the customer and they’ll buy your product. The music industry seems to be learning - so are the movie industry and the government ready to listen?

On the same theme

Darren Waters, Technology editor for BBC News, speaks to Digital Planet about the Pirate Bay's plans to appeal.

US judge and academic, Richard A. Posner reflects on the ethics of copyright.

 
Mike Richards

About the author

Mike Richards joined the Open University in 1996 to help trial teaching over the Internet. Since then he has taught courses ranging from an introduction to robots to the engineering works of Leonardo da Vinci; but has spent most of his time writing about security - everything from the Enigma machines to e-shopping. He is currently working on a new course exploring the world of ubiquitous computers; imagine a world where computers so small and cheap they can be put in everyday objects - smartphones today, smartclothes tomorrow.

Subscribe to Mike Richards's posts

 

The BBC and The Open University are not responsible for the content of external websites.

 

Permalink: Piracy is definitely illegal - Piracy is definitely illegal 0 Comments
Categories: Technology, Deception, Media industry Tags: copyright, file sharing, internet, law, piracy, technology, the pirate bay

Bookmark with:

  • del.icio.us
  • Digg
  • Facebook
  • Newsvine
  • NowPublic
  • Reddit
  • Stumbleupon
Please wait while loading. You must have JavaScript enabled to view star ratings.
 

Happy Ada Lovelace Day!

Posted on 24/03/09 by Mike Richards

 

I’d have sent a card if only Clintons carried them. 24th March has been named Ada Lovelace Day to commemorate the role of women in technology.

Ada Lovelace [image Wikimedia]
Ada Lovelace
[image Wikimedia]

It wouldn’t be surprising if you haven’t heard of Augusta Ada King, Countess of Lovelace, who must be considered the World’s first computer programmer – even though she died almost a century before the first computers roared into life.

Ada was born in December 1815 into a life of wealth and privilege as the only legitimate daughter of the poet Lord Byron; although he deserted his family only a year after she was born. A sickly child, Ada was not expected to survive, but despite a series of life-threatening illnesses, she continued her education, and by her teenage years was becoming recognized as a mathematical prodigy. In addition to whatever natural talent she possessed, Ada was driven to the exploration of mathematics by her mother; who saw in logic, a cure for the madness that had afflicted Lord Byron. Ada was taught by, and corresponded with many of the leading mathematicians of her day. And one of these mathematicians was perhaps the most extraordinary man of his day – Charles Babbage.

Born in 1791, Babbage was a brilliant although deeply unpleasant man. He had been a professor of mathematics at Cambridge, broken the supposedly impenetrable Vigenère autokey cipher used by every diplomatic mission in Europe and even had time to invent the cowcatcher for locomotives. But his real passion lay in the possibility of automating mathematical calculations.

The scientific and Industrial revolutions had created an insatiable demand for accurate calculations ranging from determining the orbits of the newly discovered planets Uranus and Neptune; to generating accurate maps and navigational charts needed for the expanding global economy; through to the tables of logarithms, sines and cosines used by the engineers building the machines on which European prosperity was based. Such was the demand that there were not enough mathematicians in the world to perform the calculations.

A similar problem had confronted the mathematician and engineer, Gaspard de Prony who had been commissioned to draw up new books of tables for the French government. De Prony’s task was immense; he would need to create logarithms for all of the numbers from 1 to 10,000 – accurate to nineteen decimal places, and the sines of angles to no less than twenty-five decimal places! De Prony’s solution was to create three teams of mathematicians. At the top were six of France’s leading mathematicians who would devise the calculations needed to generate each entry in the table. Below them were a similar number of less-skilled mathematicians who would decompose the complicated formulae into a series of relatively simple additions or subtractions. The lowest tier of de Prony’s scheme were eighty relatively unskilled workers who actually produced the mathematical tables. So long as they followed the list of additions and subtractions in the correct order (and got the right result), they would arrive at the right result.

Babbage saw de Prony’s monumental tables and made the next intellectual leap. If de Prony could treat people like machines in order to generate mathematical tables, then perhaps it would be possible to generate them with machines. He was not the first person to think of this, as long ago as 1623, Wilhelm Schickard had built a simple calculator; but Babbage’s machine was far more elaborate and capable of performing complex calculations. Babbage was also perhaps the first person to realise that so long as a machine was correctly constructed it would produce tables to any level of accuracy without ever tiring or making an error.

He became so excited by the possibility of mechanical intelligence that he was taken ill

An intriguing second source of inspiration for Babbage was the so-called 'Mechanical Turk’, an elaborate parlour trick that had been touring Europe from the late 18th Century. The Mechanical Turk was supposedly a machine that could play chess against a human opponent – and crucially, win. It had proved a sensation in the courts of Europe with opinion equally divided whether it was an especially clever automaton, or if it actually concealed a human player. In 1819 the Turk came to Britain where Babbage challenged it to at least two games (he won one, lost the other). Babbage was convinced (correctly as it turned out) that the Turk was a trick and operated by a human, but he began to consider the possibility that a machine was capable of playing games against humans. He became so excited by the possibility of mechanical intelligence that he was taken ill and forced to retire to the countryside in order to recuperate.

During this period he began to design the Difference Engine that was announced in1822; it was to be a man-sized machine built from steel rods and brass gears turned by hand for the express purpose of generating mathematical tables. The Difference Engine made a huge impression; and the British government agreed to fund its development with the colossal sum of £17,000 (about £1,200,000 today).

There was only one problem – and that was Charles Babbage. He simply could not settle down to the task of building his machine. The Difference Engine had triggered a creative explosion; Babbage had a new idea; one that had never occurred to anyone in the World – a machine that could perform any intellectual task. The Industrial Revolution was in full flood and it was being powered by machines – pumps, ships, locomotives, weaving frames, drills – but each of these machines served a single purpose; a steam locomotive could not weave cotton. But Babbage’s Analytical Engine could be repurposed – it could be programmed – it was a computer.

Once again Babbage’s inspiration came from France where in 1801, Joseph Jacquard had designed a loom capable of weaving intricate patterns into cloth and silk, not because of a skilled operator, but by blindly following instructions punched into cards. Rearranging the cards created new patterns in the cloth – they constituted a very simple program. A single loom, operated by unskilled labour could replace dozens of skilled workers, producing much more material at a fraction of the cost; perhaps inevitably, Jacquard's looms triggered civil unrest when they were introduced into the French weaving industry; the first of many disputes caused by automation.

Babbage’s Difference Engine stood about as high as a man and would have been operated by hand. His Analytical Engine would have been the size of a large house and powered by steam – but once you get past the awe-inspiring scale of the endeavour, the tens of thousands of jewel-like gears and bearings – it resembles a modern computer in almost every respect. The Analytical Engine had a memory (which Babbage called the ‘store’) big enough to hold one thousand numbers, each of up to fifty digits; these were to be processed in a central processor (the ‘mill’). Babbage’s mill would be able to perform all of the simple mathematical functions as well as logical comparisons (such as ‘greater than’ or ‘less than’) and calculate the square roots of numbers.

The machine would have been controlled by thousands of Jacquard’s cards that would have been fed into the Analytical Engine from automated hoppers. Each card would contain either data or instructions. The instructions formed the very first computer programming language and contained concepts such as loops (which repeat operations) and conditional statements (such as IF this is TRUE then do this…), which are familiar to all modern computer programmers.

There is no doubt; the Analytical Engine was one of the greatest ideas of the 19th Century. It should have changed the world.

And this is where we return to Ada Lovelace. She met Babbage at his London studio when she was only seventeen and had seen some of the workings of the Difference Engine. According to her companions, Ada immediately understood the workings of the machine and its potential. Throughout the 1830s conversed regularly with Babbage and the two became close friends, although there is no evidence they were ever romantically entangled. Certainly Babbage was entranced with his young protégé. In 1843 he wrote:

Forget this world and all its troubles and if possible its multitudinous Charlatans — every thing in short but the Enchantress of Numbers.

In 1842 Ada translated Luigi Menabrea’s description of the Analytical Engine ‘Notions sur la machine analytique de Charles Babbage from the original French. At first she was content to perform only the translation, but at Babbage’s instigation, she began to add extensive annotations to the original text.

We discussed together the various illustrations that might be introduced: I suggested several, but the selection was entirely her own. So also was the algebraic working out of the different problems, except, indeed, that relating to the numbers of Bernoulli, which I had offered to do to save Lady Lovelace the trouble. This she sent back to me for an amendment, having detected a grave mistake which I had made in the process.

These ‘algebraic working’s are what we would now call a computer program – they were the commands that would be punched into Jacquard cards and fed into the Analytical Engine. Charles Babbage and Ada Lovelace had written the world’s first computer program – and they didn’t have a computer!

The distinctive characteristic of the Analytical Engine, and that which has rendered it possible to endow mechanism with such extensive faculties as bid fair to make this engine the executive right-hand of abstract algebra, is the introduction into it of the principle which Jacquard devised for regulating, by means of punched cards, the most complicated patterns in the fabrication of brocaded stuffs. It is in this that the distinction between the two engines lies. Nothing of the sort exists in the Difference Engine. We may say most aptly that the Analytical Engine weaves algebraical patterns just as the Jacquard loom weaves flowers and leaves.

But Ada’s thoughts about the Analytical Engine went even further. Babbage had always seen his creation as a way of generating numbers, Ada saw the possibilities were unlimited; just as Babbage had once wondered that a machine might play a game of checkers, Ada saw the Analytical Engine as a creative tool.

Again, [the Analytical Engine] might act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine . . . Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.

It's worth pausing for a moment - in 1843, Ada Lovelace was imagining a machine that would not only play music, but also create it.

The story does not end well for any of the players. Ada went in to long-term decline shortly after the publication of her work. She was desperately lonely, lacking friends with whom she could discuss her explorations of mathematics, and as a woman she was forbidden from joining many of the scientific institutions of the day. She is known to have become a heavy drinker and to have experimented with opium. Worse still, she became convinced she had found a perfect scheme for determining the winners of horse races; she became a gambling addict and ran up huge debts. She even became estranged from her family. In 1852 she was diagnosed with uterine cancer, which progressed rapidly. She died later that year, aged only 37. Charles Babbage remained her friend to the end.

Babbage too was a deeply troubled man. The original funding for his Difference Engine had dried up because of his inability to bring the project to a conclusion. Rather than produce a working Difference Engine, Babbage had become distracted by the possibilities of the Analytical Engine. An enraged government turned their back on the scheme, claiming it was worthless and would never have worked. It was a desperately shortsighted decision; the Difference Engine was entirely practical and would have revolutionised the World. Much later, variations of it were produced in Britain and Europe; but Charles Babbage never saw a penny. A near replica of the Difference Engine was constructed for the Science Museum in Kensington using materials and construction techniques that would have been familiar to Babbage. It works perfectly.

The Analytical Engine was never finished; only models and individual components had been completed by the time Babbage died in 1871. He had beset by financial problems and, following the self-inflicted fiasco of the Difference Engine, unable to obtain government funding. Worse still, Babbage’s own difficult personality had led him into conflict after conflict, most notably with his chief engineer Joseph Clement who had devised the ultra-high precision machine tools needed to cut the myriad components of the Analytical Engine. As if that were not bad enough, many of Babbage’s contemporaries began to denounce the project, claiming it was worthless or even impossible.

By the 1850s, it was clear that Babbage’s best work lay in the past. He became deeply embittered, writing (all too presciently):

Propose to an Englishman any principle, or any instrument, however admirable, and you will observe that the whole effort of the English mind is directed to find a difficulty, a defect, or an impossibility in it. If you speak to him of a machine for peeling a potato, he will pronounce it impossible: if you peel a potato with it before his eyes, he will declare it useless, because it will not slice a pineapple.

When he died of kidney failure in 1871, Charles Babbage was practically unknown to the public. The funeral attracted only one carriage and three mourners. He did not even receive an obituary.

Today, Babbage is regarded as the father of the modern computer and one of the most brilliant individuals of the 19th Century. Ada Lovelace is less well remembered, her most widespread monument being the computer language Ada that has been used to build some of the largest and most reliable computer systems in the World. But perhaps her best memorial is in her writings. In 1843 Ada was wondering if a machine could be intelligent:

It is desirable to guard against the possibility of exaggerated ideas that might arise as to the powers of the Analytical Engine. In considering any new subject, there is frequently a tendency, first, to overrate what we find to be already interesting or remarkable; and, secondly, by a sort of natural reaction, to undervalue the true state of the case, when we do discover that our notions have surpassed those that were really tenable. The Analytical Engine has no pretensions whatever to originate any thing. It can do whatever we know how to order it to perform. It can follow analysis; but it has no power of anticipating any analytical relations or truths.

Today, computer scientists working in artificial intelligence and science fiction authors still argue whether Ada was right.

 
Mike Richards

About the author

Mike Richards joined the Open University in 1996 to help trial teaching over the Internet. Since then he has taught courses ranging from an introduction to robots to the engineering works of Leonardo da Vinci; but has spent most of his time writing about security - everything from the Enigma machines to e-shopping. He is currently working on a new course exploring the world of ubiquitous computers; imagine a world where computers so small and cheap they can be put in everyday objects - smartphones today, smartclothes tomorrow.

Subscribe to Mike Richards's posts

 

The BBC and The Open University are not responsible for the content of external websites.

 

Permalink: Happy Ada Lovelace Day! - Happy Ada Lovelace Day! 0 Comments
Categories: Technology Tags: ada lovelace, analytical engine, charles babbage, computer, difference engine, gaspard de prony, history, joseph jacquard, mathematics, technology

Bookmark with:

  • del.icio.us
  • Digg
  • Facebook
  • Newsvine
  • NowPublic
  • Reddit
  • Stumbleupon
Please wait while loading. You must have JavaScript enabled to view star ratings.
 

1 2 3 4 Next Page >