On February 25, 1991, an Iraqi Scud missile came down on a U.S. Army barracks in Dhahran, Saudi Arabia. Twenty-eight Americans were killed. The Patriot battery guarding Dhahran Air Base neither tracked nor intercepted it.

No part had broken. A year later, the U.S. General Accounting Office (GAO) told Congress that the cause was one calculation inside the weapons control computer. It was a time error that grew a little more the longer the system stayed on.

In a battery that had been running for over 100 hours, it had reached 0.3433 seconds. How could less than a second let a missile through?

Dhahran, February 25, 1991

In the Gulf War, the U.S.-led coalition's air and ground war ran from January 16, 1991, to February 28. During those weeks Iraq fired missiles in retaliation at Israel and at coalition bases in Saudi Arabia. Soon after Operation Desert Shield started, U.S. Patriot battalions went first to Saudi Arabia and later to Israel to guard against Iraqi Scuds. The wider story of the war is in The Gulf War, 1991: From Desert Shield to Desert Storm.

Six Patriot batteries protected the airfields and seaports of Dhahran, and one of them, Alpha Battery, covered Dhahran Air Base. By February 25, it had been running without a break for over 100 hours. It did not engage the incoming Scud, and the missile struck the barracks.

The chairman of a subcommittee of the House Committee on Science, Space, and Technology asked GAO to find out whether a software problem was involved. GAO worked on the question between June 1991 and January 1992. It did not stop at reading the Army's analyses. It checked the Army's findings on its own by studying the computer architecture, the assembly language programs and the machine instructions behind the error.

The radar works out where to look next

When the Patriot radar finds an object that looks like a Scud, it calculates the region of sky where that object should appear next. That region is called the range gate. The radar processes only what falls inside it, and finding the object there again confirms it as a Scud. How a radar sends and receives its signals is covered in Radar: measuring distance and motion with radio waves.

The prediction uses two values: the Scud's known speed and the moment the radar last detected it. Speed multiplied by time gives the distance moved in between. If the time is wrong, the predicted spot is wrong too.

Two-panel concept diagram. Left, 'Clock accurate': the target dot sits inside the radar's predicted rectangular window, with a note that the prediction uses the target's speed and the time of the last detection. Right, 'Clock off after a long run': the window has moved down and the target dot sits outside it, with a note that a small time error moves the window so nothing is found where it looks. No values or scale
Where the radar looks next: the range gate (diagram)(Diagram)

Think of following a ball across a dark field with a flashlight. You move the light to where the ball should roll next, but if your clock runs late, the light lands where the ball has already been. A real radar differs in that a fixed calculation, not a guess, sets the window, and signals outside the window are filtered out entirely.

A clock counting tenths of a second, and 24 bits

The Patriot's clock counted time continuously in tenths of a second and stored it as a whole number. The longer the system ran, the larger that number grew. To use it in the prediction, the computer had to turn the whole number into a real number with a decimal part.

The trouble was that the computer's registers, the slots that hold numbers during arithmetic, were only 24 bits long. The converted value could not be more precise than 24 bits, and the conversion lost precision, so the time calculation came out inaccurate. The weapons control computer used in the Gulf War came from a 1970s design and had only a limited ability to do high-precision calculations.

GAO wrote that the effect on the range gate grew in direct proportion to the target's speed and to how long the system had been running. Double the run time and the shift doubles. A Scud flies at about Mach 5 (3,750 mph), so the same time error became a larger distance on a fast target.

None of this matched the original design. The Patriot was built to defend Europe against aircraft and cruise missiles flying up to about Mach 2 (1,500 mph). It was meant to stay hidden by moving often, operating at any one site for just a few hours. The Gulf War was the first time it defended against Scuds, and it was not expected to run continuously for long periods.

Eight hours, twenty hours, a hundred hours

Appendix II of the GAO report lists the time error and the range-gate shift for different run times. After 1 hour, the error was 0.0034 seconds and the shift 7 m. After 8 hours, it was 0.0275 seconds and 55 m. After 100 hours, it was 0.3433 seconds and 687 m.

Bar chart of the time error and the range-gate shift by hours of continuous operation: 1 h, 0.0034 s and 7 m; 8 h, 0.0275 s and 55 m; 20 h, 0.0687 s and 137 m; 48 h, 0.1648 s and 330 m; 72 h, 0.2472 s and 494 m; 100 h, 0.3433 s and 687 m. Bar heights are to scale. A dashed line at 20 hours reads 'After about 20 h: target outside the range gate (GAO)', and the 100-hour bar is marked 'Alpha Battery: about 100 h'
The longer it ran, the bigger the error. Values from Appendix II of the GAO report (diagram)(Diagram)

Where did it become dangerous? Patriot Project Office officials told GAO that the system cannot follow a Scud once the range gate shifts by 50% or more. Israeli data showed a 20% shift after 8 hours, and because the shift grows in step with time, about 20 hours of continuous running would reach 50%. Past that point, the radar looks for the target in the wrong place.

Alpha Battery had been on for about 100 hours, five times that. GAO found that rebooting the system every few hours would have cleared the large shifts. A reboot took about 60–90 seconds and set the computer's clock back to zero.

The fix that arrived a day late

The warning signs came before the attack. Two weeks earlier, the Army had received Israeli data showing a loss of accuracy after 8 hours of continuous running. Israeli commanders had fitted recorders to their own Patriot units and handed the data to the U.S. Army.

Army officials judged the Israeli experience to be unusual, because they assumed other users would not run their systems for 8 hours or more. Even so, they analyzed the data, confirmed the loss of accuracy and added a change that compensated for the time error to a software version released on February 16. What they did not do was use the data to work out how long the Patriot could run before the error made it ineffective.

On February 21, the Patriot Project Office sent users a message saying that "very long run times" could shift the range gate. It did not say how many hours counted as very long. Officials assumed users would not keep the batteries on long enough to lose targets, so they saw no need for more detailed guidance.

Date line for February 1991. About two weeks before: Israeli data show a 20% range-gate shift after 8 hours. February 16: a software version with a time correction is released. February 21: a message to users says 'very long run times' can shift the gate, with no number of hours. February 25: Alpha Battery, on for over 100 hours, does not track the Scud, and 28 are killed in an Army barracks. February 26: the corrected software reaches Dhahran. A box below gives the Army officials' explanation that arranging air and ground transport in wartime caused the delay, and notes that the software was changed six times during the war, each change taking the system down for 1–2 hours. Spacing is not to scale
Two weeks in February 1991 (diagram)(Diagram)

The corrected software reached Dhahran on February 26, the day after the attack. Army officials said the delay came from the time needed to arrange air and ground transport in wartime. The Patriot software was changed six times during the war, and each change took the system down for at least 1–2 hours.

What the report left behind

Records were a problem too. The Patriot had no built-in data recorder to keep performance information. Portable recorders existed, but U.S. commanders decided against them, fearing the recorders might shut the system down without warning. The problem first surfaced in data from Israeli units that did use recorders.

The report lists what came next. In September 1991, Patriot Project Office officials said the algorithms would keep being re-examined in light of Desert Storm and tested against aircraft, cruise missiles and tactical ballistic missiles. An endurance test was also run to make sure long run times caused no other problems.

GAO explained that how precisely a computer can calculate depends on how many bits its registers hold. Without software written to make up for it, 24-bit registers cannot give more than 24 bits of precision. By 1992, when the report came out, computers already had registers of up to 64 bits.

Dhahran remains a record of how far a small error can grow. It grew because the design assumed a few hours at one site and Mach 2 targets, while actual use meant days at one site and Mach 5 targets.

What to read next