STAMP Primer SeriesSTPA PrimerModule 1 of 3Finding Problems EarlyLesson 3 of 5Finding Problems Early, With SecurityLesson 3 of 6The Whole SeriesLesson 7 of 10
STPA Primer
STPA looks for the ways a system could cause harm, even when every part works, so they can be fixed before anyone is hurt.
Inside the STPA Primer
About 40 minutes in all
Module 1 · Anticipating Unsafe Interactions (12 min)
- 1.1Asking the Right Questions
The well-known ways control loops break down, seen in a hospital and in a winter takeoff.
- 1.2Looking Beyond Failures in STPA
How a human error analysis, a function failure analysis, and STPA each look at the winter takeoff.
- 1.3STPA Overview: The Four Steps
What each step involves, and the constraints and solutions it produces.
Module 2 · STPA Worked Example (22 min)
- 2.1Step 1: Losses, Hazards, and Constraints
A shift-by-wire car design, and the losses, hazards, and constraints that set the analysis’s purpose.
- 2.2Step 2: The Control Structure
The driver, the software, and the feedback the driver relies on.
- 2.3Step 3: Unsafe Control Actions
When the driver’s or the software’s handling of Park becomes unsafe.
- 2.4Step 4: A Loss Scenario
How a driver can get out believing the vehicle is in Park.
- 2.5Formal Scenarios: Four Classes for Each UCA
Four classes of scenario built from an unsafe control action, and the causes and solutions they lead to.
Module 3 · Putting STPA to Use (6 min)
- 3.1Choosing Solutions Without Probabilities
Why STPA results come without probabilities, and how to use them to decide what to fix, accept, or require.
- 3.2Blind Tests: Can You Prove STPA Works?
How STPA compared with HAZOP, FTA, and FMEA on a real design flaw.
Section 1.1 · Anticipating Unsafe Interactions
Asking the Right Questions
Builds on: About STAMP, The Control Loop Model
STPA (System-Theoretic Process Analysis) is a hazard analysis method built on STAMP. Engineers use hazard analysis to find problems that would otherwise stay hidden until something goes wrong. Hazard analysis of an organization can also be very revealing, but it requires a method that can handle organizational complexity.
Teams apply STPA to identify loss scenarios describing how interactions in the system will lead to a loss, with or without a failure. Each scenario shows a flaw or vulnerability in the system, such as a missing responsibility or inadequate feedback, so the team can develop a solution before losses occur. STPA gives the team a way to ask the right questions to anticipate how losses can happen.
The two examples below show how a control loop can be analyzed by asking questions about the control actions, the controller beliefs, and feedback. The answers can be used to build a loss scenario and develop solutions to prevent it from happening. The full STPA method, described in Section 1.3, defines the specific step-by-step process to identify these losses and hazards, model the control structure, and analyze each control loop in a system.
Human Factors Example: Reviewing Lab Results
This short example shows the kinds of questions STPA raises about a single control loop.
Pre-Surgical Nurse Practitioner
Step through this control loop:
1Losses and Hazards
Before surgery, a nurse practitioner checks that the patient is medically ready for the surgery. What losses must be prevented, and what hazards can lead to them?
- Loss: Deterioration of the patient’s health and quality of life
System hazards that lead to it:
- Patient undergoes surgery without being medically ready
- Patient’s debilitating condition is not treated or treatment is delayed
2The Control Structure
What control loops exist to prevent the losses and hazards?
- Control Actions: What can the nurse practitioner do to prevent hazards?
- Process Model: What beliefs drive those decisions?
- Feedback: What feedback informs those beliefs?
3Questions About the Control Loop
- Control Action: When would not referring a patient be unsafe?
- Process Model: What might a nurse practitioner believe about a test result, and why?
- Feedback: Could a result display as normal (no red flag) when it is actually abnormal?
4The Loss Scenario
Answers:
- Control Action:
- Process Model:
- Feedback:
- Control action
- The nurse practitioner doesn’t refer the patient to a specialist.
- Process model (beliefs)
- The nurse practitioner believes all the patient’s results are normal.
- Feedback
- If an abnormal lab result is shown in plain black, it could look like a normal result. What would cause that? By design, the result is flagged in red if it falls outside the reference range that was programmed for that test. What if the reference range is missing? For some tests, the range of normal results depends on many factors like the time of day. These complex ranges cannot be programmed into the tool, so they are intentionally not set for some tests. If a test has no programmed range, its result is never flagged and is shown in plain black exactly like a normal result, without any sign that the flagging is effectively disabled. The system may be unsafe even if it satisfies all of the functions and requirements that had been defined for it.
- Patient
- The low hormone level goes untreated, which can be dangerous during surgery.
Solutions
- Ensure the system can flag tests whose normal range depends on other factors, like the time of day the test was done.
- Ensure that any result that cannot be flagged says “flags disabled” or something similar, instead of showing in plain black like a normal result.
- Ensure clinicians know which tests may require additional interpretation by another specialty.
- Ensure that when new tests are added to the standard test panel, clinicians are informed not only what the test is but also its limitations, such as how its results can be misread when they aren’t flagged, and when to contact a specialist.
This scenario is based on a real case. Read the 2024 MIT report
An Engineering Example: A Winter Takeoff
An airplane is about to take off on a winter day. To set takeoff thrust, the crew pushes the thrust levers forward until an engine pressure ratio (EPR) gauge in the cockpit shows a target number. The gauge gets its reading from a small sensor in each engine’s air intake and another at the back of the engine. Heaters, called anti-ice, keep ice off the intakes and those sensors.
Analyzing the Crew’s Control Loop
The Crew’s Control Loop
Step through what could go wrong:
STPA starts from what could go wrong in terms of losses and hazards that must be prevented. Then the control structure is modeled, and the team answers questions about the control loops. The answers build a loss scenario: a step-by-step account of how a loss could happen.
Questions from STPA
- What losses and hazards must be prevented?
- What control actions can be used to control the hazards?
- Why might a trained crew leave anti-ice off?
- How could ice be forming while the crew believes anti-ice isn’t needed?
- Could the engines do what they’re told and still produce too little thrust?
- What would the crew see if the engines gave less thrust?
The Loss Scenario
Anti-Ice
- Control action
- The crew leaves anti-ice off while ice can form in the engines.
- Process model (beliefs)
- The crew believes anti-ice isn’t needed.
- Feedback
- It’s warm out, and any snow the crew can see is melting. Nothing looks icy.
- Engines
- Ice builds up on the intake sensors, where the crew can’t see it, because air cools as it speeds into the engines.
Takeoff Thrust
- Control action
- The crew stops pushing the thrust levers forward while thrust is still too low.
- Process model (beliefs)
- The crew believes thrust is high enough for takeoff.
- Feedback
- If the EPR gauge shows the takeoff target, it would look like thrust is sufficient. What would cause that? By design, the gauge shows the ratio of the pressure at the back of the engine to the pressure at a sensor in the intake. That ratio goes up as thrust goes up. What if ice forms in the intake? Ice around the sensor changes its local pressure, and the ratio doesn’t reflect thrust as expected. No warning exists for the ice or the low thrust: the airplane has no way to detect either one. The engine speed gauges read a little low, which is easy to miss while watching the runway, and on a snowy runway the slow speed-up looks normal.
- Engines
- The engines do what the levers tell them, so they give less thrust than the takeoff needs.
Both beliefs are clearly wrong in hindsight. Understanding how these beliefs form, from what the crew can see at the time, is what makes it possible to prevent them.
Solutions
- Control action: Ensure sensor heat comes on by itself in cold, wet weather, so the crew doesn’t have to decide when it’s needed.
- Process model (beliefs): Ensure the checklist says engine ice can form above freezing, even when nothing looks icy.
- Feedback: Ensure the crew is alerted when the EPR gauge and the engine speed gauges disagree, or when the airplane is too slow for how far it has gone down the runway.
Section 1.2 · Anticipating Unsafe Interactions
Looking Beyond Failures in STPA
When people start a hazard analysis, it’s easy to begin with failures. A safety engineer might ask, “Could an engine lose thrust?” A human factors engineer might ask, “Could the crew skip a step in the procedure?” These questions are helpful, but they don’t tell the whole story.
These questions are a sign of a failure-based analysis, and they work well at finding failures. They start from an intended behavior, such as a known function or a step in a procedure, and look for departures from it. The questions come easily because they compare the system with our picture of how it should work. They also assume that picture is right.
STPA’s questions start from the situation instead. When is it unsafe to increase or decrease thrust? In what situation would it be too soon to stop? How could the process model appear reasonable given the feedback available? These questions can still find failures, such as an engine that loses thrust or a sensor failure that causes incorrect feedback. They also find cases where every function or procedure worked, but together they created unsafe interactions that nobody anticipated.
In STPA, don’t spend most of your time asking when a control action would break a procedure or a known requirement, because that doesn’t necessarily make a control action unsafe. Ask in what state the control action would be unsafe. Instead of asking how a component could deviate from its function, ask how it can contribute to a hazard or loss. Each step of STPA includes guidance that keeps the whole system in view and helps avoid the trap of considering only failures.
How STPA Differs From Task Analysis and FHA
The cards below show two traditional ways to analyze the winter takeoff from Section 1.1, and how STPA approaches it from a different perspective.
Human Error View
Model: crew tasks
What could go wrong
- The crew could forget to switch on engine anti-ice.
- The crew could call out “thrust set” when it isn’t.
Fix
Train crews on winter operations and thrust checks, and make sure the checklist covers anti-ice.
Assumes the task steps are right: the crew can tell from the weather when anti-ice is needed, and the EPR gauge will accurately reflect the engine thrust.
Function Failure View
Model: functions
What could go wrong
- Partial loss of thrust during takeoff.
- Loss of engine anti-ice.
Effect
The engine thrust warning alerts the crew, who stop the takeoff or return to land. If the engine thrust warning also fails, the airplane may not climb safely.
Assumes the design can warn the crew in all relevant conditions, and looks for failures that could stop the warning.
STPA View
Model: a control loop
What could go wrong
- Control action: the crew could stop pushing the thrust levers while thrust is still too low, or leave anti-ice off when ice can form in the engines.
- Process model (beliefs): the crew could believe takeoff thrust is set when it’s too low, or that the autothrottle is still adjusting thrust after it has stopped.
- Feedback: the EPR gauge could show the takeoff target while the engines give too little thrust, and the crew may not get any warning that ice is building up in the engines.
Doesn’t assume anything failed.
Comparing STPA With FMEA, Fault Tree Analysis, and HAZOP
Section 1.3 · Anticipating Unsafe Interactions
STPA Overview: The Four Steps
Sections 1.1 and 1.2 showed the types of questions STPA asks about a control loop, and how they differ from the questions a failure-based analysis asks. STPA is a systematic process for asking questions like these across a large system, before a loss occurs.
A large system has many control loops, run by people, automation, and organizations. Each controller can affect what other controllers and processes may do. Simply brainstorming potential problems is not the most efficient or reliable way to analyze a more complex system, so STPA works from the top down.
The process starts with the stakeholders: what they care about, and which losses the analysis is meant to prevent. Next, the team models the control loops as a control structure. Then the team analyzes that structure to see what could cause those losses, finding the right questions to ask, like the ones in Section 1.1, about each control loop. Each step produces solutions, such as constraints. The first steps produce constraints for the system as a whole, and each later step adds detail, eventually producing requirements for specific components.
-
1
What you do
Define the Purpose of the Analysis
Identify the losses that stakeholders can’t accept and the system-level hazards that could lead to them.
What you get
System-Level Constraints
High-level constraints the whole system has to meet to prevent the hazards. They drive the more detailed constraints and solutions in the steps that follow.
-
2
What you do
Model the Control Structure
Map the controllers (people, software, automation, and organizations), the control actions they can take, and the feedback they get.
What you get
Constraints on the Control Structure
What the system has to provide for control to work: the control loops that must exist, the control actions each controller can use, the responsibilities each one has, and the feedback each one relies on.
-
3
What you do
Identify Unsafe Control Actions
Find the contexts in which a control action would be unsafe: when it isn’t provided, when it is provided, when it comes too early, too late, or out of order, and when it’s stopped too soon or applied too long.
What you get
Controller Constraints
An unsafe control action becomes a constraint on the controller: what it must or must not do in that context.
-
4
What you do
Identify Loss Scenarios
Work out why an unsafe control action could happen, or why a safe one might not get carried out: what the controller believed, what feedback it had, and what the process itself did.
What you get
Requirements and Other Solutions
Solutions aimed at specific scenarios: requirements, design changes, test cases, procedures, training, and leading indicators to watch in operation.