One sensor, one software function.
+ The questionHow do aviation and defense set integrity, and what did the 737 MAX show about a function fed by one sensor?
A wrong reading on the left side
On 29 October 2018 a Lion Air Boeing 737 MAX took off from Jakarta with one of its two angle-of-attack sensors giving a wrong reading. The angle of attack is the angle at which the wing meets the oncoming air. The aircraft measured it with a sensor on each side of the fuselage, each sensor a small vane that turns to line up with the airflow. The left sensor had been replaced at Denpasar the day before. It read about 21° higher than the right, and the installation test there did not detect the bias. On that flight a flight-control function called MCAS, the Maneuvering Characteristics Augmentation System, took its input from the left sensor alone. MCAS trimmed the aircraft nose down again and again, and the aircraft descended out of control into the sea off West Java. All 189 people on board died.
About four months later, on 10 March 2019, Ethiopian Airlines flight 302, another 737 MAX, crashed after the same function acted on a wrong angle of attack, and all 157 people on board died. Both times a function rested on one sensor, and that function could move the horizontal stabilizer, the tail surface that trims the aircraft's pitch. Whether one sensor was enough had been settled years before, when the effect of the function's failure was given a class, because in aviation the class sets how rarely that effect may occur.
Severity sets the probability
An aircraft's systems are judged by what their failures would do to the flight. A failure condition is the effect that one failure or a combination of failures has on the aircraft and the people on board, and each falls into one of five classes: no safety effect, minor, major, hazardous and catastrophic. Each class but the first carries an allowed average probability per flight hour: on the order of 1 in 1,000 for minor, 1 in 100,000 for major, 1 in 10 million for hazardous and 1 in a billion for catastrophic. The figure for minor is given for reference only. Each step of severity asks for a probability about 100 times lower. The classes and figures are those of the US Federal Aviation Administration, or FAA, in AC 25.1309-1B of 30 August 2024, its guidance on the systems of transport airplanes.
The objective is stated per flight hour, like a PFH in IEC 61508's high-demand and continuous modes, and the catastrophic figure is the lower edge of SIL 4's band for the PFH (Chapter 8). A PFH, though, is the frequency of one safety function's dangerous failure. An aircraft's objective is the probability of the effect itself, whatever combination of failures leads to it and in whichever functions they occur.
One rule stands beside the numbers: no single failure may result in a catastrophic failure condition, and a single failure is not treated as extremely improbable except under specific extreme conditions. A catastrophic effect therefore needs at least two independent failures however reliable each part is, so in Chapter 13's terms the design must tolerate one fault. For the classes below catastrophic the probability is the test, so whether a function may rest on one input depends on how rarely that input fails, set against the figure of the function's class.
Development assurance follows the same classes
A probability can be worked out for parts that fail at random, but software and complex electronics fail through faults in their making, which have no rate (Chapter 3). For them aviation sets a development assurance level, a grade of how thoroughly a function or an item is specified, built and verified, lettered from A, the most rigorous. Like the systematic capability of Chapter 15, it states rigor, not a failure rate. The level follows the same classes. The functional hazard assessment is the analysis that names each failure condition and its class, and it also sets each function's level. The more severe the potential effects, the more rigorous the development assurance should be, as AC 25.1309-1B advises.
The guidelines behind the levels come from industry bodies, and the regulator recognizes them. SAE publishes ARP4754B, for developing aircraft and systems, and ARP4761A, for the safety assessment, and it revised both on 20 December 2023. ARP4754B refers to DO-178C for software. RTCA published DO-178C, the current edition of the software document, in 2011, and its level A objectives include the MC/DC of Chapter 16. FAA recognizes DO-178C through AC 20-115D of 2017. It recognizes ARP4754A, the revision before B, through AC 20-174 of 2011, under which an applicant proposes the levels of its functions and items in its certification plan, with the reasons, for FAA's concurrence.
FAA's guidance and that of the European Union Aviation Safety Agency, or EASA, both have the system safety process assign each function its minimum development assurance level. EASA bases that minimum on the severity of the function's failure conditions. The table that sets a letter beside each class sits in the industry documents, not in the regulators' circulars. EASA's guidance places the relationship between a function's criticality and its software level in DO-178C, and EASA may replace that relationship with its own. FAA's circular on aircraft and systems points to ARP4754A for functions and items. For small airplanes under Part 23, FAA does set letters beside the classes, in a figure of AC 23.1309-1E of 2011. There the letter depends on the airplane's class as well as the severity, runs from A to D and is called typical.
ARP4754B and DO-178C set their requirements and checks beside the V rather than on it, so the V is this book's frame for them, not theirs. ARP4754B arranges the development of an aircraft and its systems as three processes, planning, development and an integral process, and the function's development assurance level sets the choice of methods. Balashova of DMD Solutions, an engineering consultancy that sells aerospace safety services, describes the revision in these terms in a blog post of 2024. ARP4754B also checks the requirements themselves and calls that check validation. The object of that validation is a requirement, not the finished function that Chapter 19 validates. In the consultancy's account, traceability and engineering review are the primary methods of that validation. In the same account, independence is asked for validation at levels A and B and for verification at level A, and at level B for the verification of safety requirements.
DO-178C states as objectives what the development of software must achieve, and it grades them by level. It gathers traceability into two sections of its own, one for the development process and one for verification. DO-178C makes traceability bidirectional and adds trace data, a life cycle data item that should show the associations in both directions, in FAA's summary of the changes from DO-178B to DO-178C. The tests that establish structural coverage, the MC/DC of Chapter 16 among them, must themselves be traceable to requirements. The class that grades all of this work comes from the functional hazard assessment, which has no step on the V and lies off it, above its top.
- Under AC 25.1309-1B, each failure condition has an allowed probability per flight hour, whatever combination of failures leads to it, and no single failure may lead to a catastrophic one.
- A development assurance level grades rigor, not a rate, from the same class, and DO-178C's level A objectives include MC/DC (Chapter 16).
- ARP4754B validates the requirements themselves as well as verifying what is built, with independence at the higher levels, and DO-178C's trace data should show the links in both directions.
- A class rests on assumptions about what the crew will notice and how quickly it will act, and Indonesia's investigators found those under MCAS's class incorrect, as the section on MCAS below shows.
Defense grades software by its control
The US Department of Defense sets its targets as risk rather than as a probability per hour, in its standard practice for system safety, MIL-STD-882E. The standard is active with Change 1 of 27 September 2023. The changes listed for Change 1 add the mitigation of harm to civilians, define civilian harm and rewrite the general requirements in contractually binding language. The tables below are those of the standard's 2012 text. A hazard's severity falls into four categories, each defined by the effects the hazard could result in, among them harm to people and loss in money. Catastrophic includes death or a loss of $10 million or more, and critical a permanent partial disability or a loss of $1 million to $10 million. Marginal includes an injury that costs a lost work day or a loss of $100,000 to $1 million, and negligible an injury that costs no work day or a loss below $100,000.
Probability runs in five levels, from frequent down to improbable, with a sixth level for hazards that have been eliminated. A frequent hazard is likely to occur often in the life of an item, and an improbable one is so unlikely that it may never be experienced. A matrix of severity and probability gives each hazard a risk of high, serious, medium or low. A catastrophic hazard is high risk unless its probability is remote, which makes it serious, or improbable, which makes it medium. An authority named under the Department's acquisition instruction must accept each risk, and the user's representative must formally concur before a serious or high risk is accepted.
For software the standard adds a second measure. Each software function takes a software control category, set by how much control the software has over the hazard: autonomous, semi-autonomous, redundant fault tolerant, influential and no safety impact. Influential software only produces safety-related information for an operator. Crossed with severity, the category gives a software criticality index from 1 to 5, and the index sets the level of rigor. Index 1 calls for analysis of the requirements, architecture, design and code, with in-depth safety-specific testing. Index 2 leaves out the analysis of the code, and index 3 that of the design as well. Index 4 drops the analysis of the requirements and the architecture and keeps the safety-specific testing alone, and index 5 calls for none of this work once the software is assessed as having no safety role.
| Software control category | Catastrophic | Critical | Marginal | Negligible |
|---|---|---|---|---|
| Autonomous | 1 | 1 | 3 | 4 |
| Semi-autonomous | 1 | 2 | 3 | 4 |
| Redundant fault tolerant | 2 | 3 | 4 | 4 |
| Influential | 3 | 4 | 4 | 4 |
| No safety impact | 5 | 5 | 5 | 5 |
Down each column, the index credits whatever stands between the software's output and the harm. Autonomous software whose failure could be catastrophic takes index 1. The same function inside a redundant design that tolerates a fault takes index 2, and software that only informs an operator takes index 3, because another channel or a person stands between its failure and the hazard. The grade follows the software's authority over the hazard as well as the severity, so a design that adds an independent channel or keeps a person in the path lowers the rigor it must prove.
How MCAS was classed, and what the investigators found
MCAS was a function within the 737 MAX's speed trim system. It was a control law held in each of the two flight control computers but active only in the one in charge for that flight. The left computer took charge at power-up, and the two alternated by flight. Each computer read the angle of attack from its own side's sensor, so MCAS read one sensor only. Its other inputs included flap position and the Mach number, the aircraft's speed as a fraction of the speed of sound. In manual flight with the flaps up, an angle of attack above a threshold set by Mach made MCAS trim the stabilizer nose down at a high rate. Electric trim by the pilot stopped MCAS, and 5 seconds later the function reset, so a reading that stayed high brought another command.
The function's authority grew during development, but its class did not change. The preliminary functional hazard assessment of 2012 judged uncommanded operation up to MCAS's maximum authority, then 0.6° of nose-down stabilizer. In March 2016 MCAS was extended to low speeds, after the stall characteristics at low speed had proved unacceptable with the speed trim system alone. The same revision allowed it to command up to 2.5° at low Mach, falling to 0.65° at high Mach. Boeing's assessments classed uncommanded MCAS operation as major and the low-Mach case as minor, and judged both classes unchanged by the increase to 2.5°. KNKT, Indonesia's transport safety investigation board, reports these assessments in its final report on the accident, published in October 2019.
A class also rests on what the crew is assumed to do. Boeing's flight-control assessments assumed that an uncommanded input is readily recognizable and that the crew takes immediate action to re-trim. KNKT found that the assessment relied on a crew that responds correctly within 3 seconds. The crew was credited as a barrier, the kind of credit Chapter 9 examines for any operator. Boeing also treated the loss of one angle-of-attack input and an erroneous reading as two independent events, and assessed their combination as beyond extremely improbable. Yet a function that read one sensor could be driven wrong by one failure.
During certification, uncommanded activation was considered to have a major effect in the normal flight envelope and a hazardous effect in the operational flight envelope, two ranges of flight conditions. Under the major class about 1 in 100,000 per flight hour would suffice, and a design with two angle-of-attack inputs could have been considered but was not required. A hazardous condition asks for sensors with less than a 1 in 10 million chance of failing per flight hour, and KNKT notes that the requirement generally means taking measurements from two sensors. FAA, NASA and nine other civil aviation authorities reviewed the certification together as the Joint Authorities Technical Review, and in October 2019 they reported how that figure was reached. A probability of 1 in 1,000 for the aircraft being in the operational flight envelope was used to achieve the 1 in 10 million required for MCAS's hazardous failure condition.
KNKT judged the class from the worst case Boeing considered, the failure of one angle-of-attack input followed by an erroneous reading. That effect would be hazardous until the crew recognized the problem. Crews had no training or guidance for the situation, so KNKT held that the class should have remained hazardous. KNKT adds that the decision to rely on a single sensor should have been avoided had the uncommanded MCAS failure condition been assessed as more severe than major.
KNKT set the single-sensor design against the hazardous class's figure with an estimate of its own, and the same estimate can be set against the major class too. About 250 aircraft were in service at the time of the accident, at an assumed average of 2,000 flight hours each: 250 × 2,000 = 500,000 fleet flight hours. Each aircraft carries two sensors, so the fleet had about 2 × 500,000 = 1,000,000 hours of sensor operation. KNKT's figure amounts to one failure in that time: 1 ÷ 1,000,000 = 1 in a million per hour of sensor operation, which KNKT writes as one failure every 1,000,000 flight hours. A hazardous condition allows about 1 in 10 million, so the estimate is 10 times too likely. The major class allows about 1 in 100,000, and the same estimate meets it with a factor of 10 to spare. The same record passes under one class and fails under the next, so the class decided whether one sensor was enough. The figure rests on an assumed utilization, and KNKT adds that the same sensor fails less often on other aircraft.
The aircraft carried two angle-of-attack sensors, but MCAS used one. Two sensors are redundancy only for a function that reads both, and channels that read one sensor share its errors (Chapter 14). The two readings met in one place, the AoA DISAGREE alert. That alert is a cross-check in Chapter 12's sense, and it flags a difference of 10° or more lasting 10 seconds. The delivered software linked the alert to an optional indicator that about a fifth of airlines chose. Lion Air was not among them, so the alert did not appear on the accident aircraft. Where the alert worked, it told only the crew.
KNKT lists nine contributing factors in chronological order, not by weight, and the first three concern the design. In the first, the assumptions about the crew's response were consistent with the industry's guidelines but "turned out to be incorrect". In the second, those assumptions and an incomplete review of the effects of several alerts at once led to the judgment that MCAS's reliance on a single sensor was appropriate and met every certification requirement. The third is the design itself, which left MCAS open to a wrong input from that sensor. The single sensor therefore met the requirements as they were applied, and it was the assumptions beneath its class that KNKT found incorrect.
The other six trace how the wrong reading reached the aircraft and why the crews could not counter it. The replacement sensor had been mis-calibrated during an earlier repair, and the installation test at Denpasar could not be determined to have been performed properly. MCAS appeared in neither the manuals nor the training. The AoA DISAGREE alert had not been correctly enabled during development, and the caution above describes its link to the optional indicator. The previous flight's crew had stopped the activations with the stabilizer trim cutout switches, which cut power to the trim motor. That crew, however, recorded in the aircraft's log neither the cutout nor the continuous stick shaker, the stall warning that shakes the control column. On the accident flight the alerts, the activations and the calls from air traffic control could not be effectively managed.
Ethiopia's investigators published their final report on flight 302 on 23 December 2022. As the US National Transportation Safety Board, or NTSB, summarizes it, electrical anomalies present since manufacture caused the sensor's heater to fail, the sensor gave wrong values, and MCAS repeatedly pushed the nose down. In its comments the NTSB holds instead that the vane separated after striking a foreign object, most likely a bird. The two accounts differ on why the sensor failed, and they agree that MCAS played a role by acting on the sensor's wrong reading.
The Joint Authorities Technical Review also found that no integrated safety assessment of MCAS as a complete function had been performed. FAA grounded the 737 MAX on 13 March 2019 and lifted the order on 18 November 2020. An airworthiness directive issued that day required the flight control software to compare the inputs from the two sensors, to permit only one MCAS activation for each high angle of attack sensed, and to preserve the crew's ability to control pitch with the control column alone. With that requirement the cross-check of the two sensors, which had fed only the crew's alert, moved inside the function. Chapter 29 takes up the reform of certification that followed, under the Aircraft Certification, Safety, and Accountability Act of 2020.
Five sectors against the same rows
Set side by side, the five sectors share the method of Parts I to V and differ in where their standards place it. Three of the standards draw the V's arrangement themselves: ISO 13849-1 for safety-related software, ISO 26262 for its reference process, and IEC 60601-1 in an informative annex that requires no particular life cycle. IEC 61511-1, ISO 21448, IEC 62304, ISO 14971, ARP4754B and DO-178C are placed beside the V, in this book's frame. In every sector a requirement is written before the design, a check answers to it and a trace joins the two. In every sector, too, part of the work has no step on the V and lies off it: operation, a risk process, hazards that arise with no fault, or the numbers that judge the hardware. The table sets the five against the same six rows.
| Sector and standards | Process plants: IEC 61511-1 (Ch 22) | Machines: ISO 13849-1, IEC 62061 (Ch 23) | Road vehicles: ISO 26262 (Ch 24) | Medical devices: IEC 60601-1, IEC 62304, ISO 14971 (Ch 25) | Aircraft: ARP4754A and B, DO-178C (Ch 26) |
|---|---|---|---|---|---|
| How integrity is graded | SIL, from the shortfall a LOPA finds against the tolerable frequency (Ch 7, 8) | PLr from severity, exposure and the possibility of avoidance, or a SIL under IEC 62061, matched through the PFH | ASIL from severity, exposure and controllability | By single faults, weighed risk and, for software, classes set by severity (Ch 16) | Failure condition class, with an allowed probability per flight hour, and a development assurance level from the same class |
| The requirement document | The safety requirements specification, and the application program's design | The safety requirements specification, at the top of the software V | Safety requirements at each level, each derived from the level above | The requirements for basic safety and for the essential performance that the maker identifies | Requirements that are themselves validated, under ARP4754B; software objectives graded by level |
| The checks and their independence | Verification under clause 7, the factory acceptance test and validation; functional safety assessment at five stages, the third complete before the hazard is introduced (Ch 19) | Module and integration tests and the validation of clause 10 | A check at each level of the right arm; confirmation measures, their independence graded by the ASIL | Verification of every function for basic safety, essential performance or risk control; validation led by someone independent of the design team, no member responsible for validating their own design | Validation of the requirements and verification of what is built, with independence at the higher levels |
| What must be traced | A technique IEC 61508-3 lists for software, forward traceability from the design to the module and integration tests; the trace of Ch 17 | The code reviewed against its module design, and each module test showing the design's requirements implemented | Each safety requirement to its source, to what is derived from it and to its verification specification | A trace for each hazard (ISO 14971); software requirements to system requirements and to tests (IEC 62304) | Trace data, which should show the links in both directions; the coverage tests to requirements |
| What sits off the V | Operation, maintenance, modification and decommissioning, with the proof tests and management of change | The numbers that judge the hardware, from the category to the common-cause score | ISO 21448's hazards with no fault | ISO 14971's risk process and the weighing of benefit against residual risk; the service test that finds a hidden failure | The safety assessment that classes each failure condition |
| The one thing to watch | The benchmark is a floor, and the analysis sets the level | A category names a structure, and the level needs its numbers too | A track built to ASIL B(D) is an ASIL B element | The single-fault tests show the pair as built, not as it stands years later | Two sensors fitted were one input to MCAS |
Classify each failure condition of a function that can act on the hazard, and write beside the class what it assumes of the people who must respond: what they will notice, how quickly, with what training and among which other alerts. Test those assumptions with the people who will act, and redo the hazard assessment whenever the function's authority or range of use changes. List every input whose wrong value alone produces the hazardous action, and for each one either add a second, cross-checked input or show that its failure rate meets the figure of the class. For the incubator, keep the cutout on its own sensor, as Chapter 4 set it, so that no single wrong reading both drives the heater and blinds its protection.
- AC 25.1309-1B gives each class of failure condition an allowed probability per flight hour, about 100 times lower for each step of severity, and allows no single failure to lead to a catastrophic condition.
- Development assurance levels grade rigor, not a rate, from the same classes. The system safety process assigns each function its minimum level, and for transport airplanes the table of letters sits in DO-178C and ARP4754A.
- MIL-STD-882E grades a hazard's risk by severity and probability, and grades software by severity and by how much control the software has over the hazard.
- MCAS could act on one angle-of-attack sensor because its uncommanded activation was classed major in the normal flight envelope, a class one sensor could meet, and its hazardous case was met by crediting how rarely the aircraft is in the operational flight envelope. KNKT found the crew-response assumptions under the classification incorrect.
Let's Talk