DEV Community

Richard Minsoo Go
Richard Minsoo Go

Posted on

Autonomous Driving Software — Ch.09: Safety and Redundancy [EN]

STATERA Library · Series 08 · Volume 12 · Chapter 09 · EN
Source: https://github.com/Statera-Library/08_Vol_12_Autonomous_Driving_Software/blob/main/Chapter_09_Safety_and_Redundancy/Chapter_09_Safety_and_Redundancy_EN.md

Volume 12. Autonomous Driving Software

Chapter 09. Safety and Redundancy

09.01. AV Safety Architecture SOTIF ISO 21448 Overview

Autonomous vehicle safety architecture must be designed as a system property rather than as an isolated emergency function. Perception, localization, prediction, planning, control, communication, computing, and actuation all contribute to the safety state of the vehicle. The architecture therefore combines preventive mechanisms, runtime supervision, redundancy, degradation strategies, and fallback behavior so that faults or performance limitations do not immediately become hazardous vehicle behavior.

The structure of this volume places safety after perception, behavior planning, trajectory generation, and control integration, allowing safety mechanisms to supervise the complete autonomy chain. It then develops runtime monitoring, sensor redundancy, fallback planning, watchdogs, safety cages, scenario testing, data-driven validation, and safety cases as dedicated topics. This reflects an architectural principle: safety must observe and constrain decisions across subsystem boundaries.

A useful distinction exists between functional safety and the Safety of the Intended Functionality, or SOTIF. Functional safety addresses unreasonable risk caused by malfunctioning behavior of electrical and electronic systems, while SOTIF addresses hazards that can arise even when components operate according to their specifications. An autonomous system may therefore contain no conventional hardware fault and still make an unsafe decision because sensing, interpretation, prediction, or decision logic is insufficient for a particular situation.

ISO 21448 provides the SOTIF framework for identifying and reducing risks associated with such functional insufficiencies. This is particularly important for automated driving functions that depend heavily on complex sensors and algorithms. A camera may be electrically healthy but unable to provide adequate information under glare, fog, darkness, or unusual visual conditions. Similarly, an object detector may execute correctly while producing an incorrect semantic interpretation outside the conditions represented sufficiently during development.

SOTIF consequently shifts part of the safety question from "Did a component fail?" to "Can the intended function remain sufficiently safe under the conditions it encounters?" The analysis considers limitations of sensing and algorithms, reasonably foreseeable misuse, environmental conditions, interaction with other road users, and triggering conditions that expose performance weaknesses. This perspective is essential for autonomy because many hazardous behaviors originate from uncertainty rather than from an easily detectable component failure.

The Operational Design Domain, or ODD, becomes a fundamental safety boundary. It specifies the conditions in which the autonomous function is intended to operate, including road or terrain characteristics, speed ranges, weather, illumination, infrastructure, traffic conditions, and other environmental constraints. The volume establishes ODD definition as an early autonomous-driving topic and separately introduces fail-safe and fail-operational principles, creating the conceptual foundation for later safety architecture.

A safety architecture should continuously determine whether the assumptions supporting autonomous operation remain valid. Sensor health, localization confidence, perception uncertainty, trajectory feasibility, controller state, communication status, compute health, and actuator feedback can all become inputs to runtime supervision. Instead of treating these signals independently, the supervisor evaluates whether the overall system remains inside an acceptable operating envelope and selects an appropriate response when confidence or capability deteriorates.

Redundancy provides another architectural layer, but redundancy should not be interpreted simply as duplication. Multiple sensors using different physical principles can reduce common failure modes: cameras provide rich appearance information, LiDAR supplies geometric measurements, radar can contribute range and relative velocity, and GNSS, IMU, and localization algorithms provide complementary pose information. Diverse redundancy becomes especially valuable when environmental conditions degrade one sensing modality without producing an explicit hardware fault.

Safety mechanisms also require independence from the functions they supervise. A runtime safety monitor should not depend entirely on the same assumptions, algorithms, data paths, or computational resources as the primary autonomy stack. Architectural separation can allow a simpler safety channel to check critical constraints such as collision risk, speed limits, localization validity, trajectory boundaries, actuator response, and system heartbeat. If the nominal autonomy function violates these constraints, the safety layer can restrict or override its command.

The response to degradation should be proportional to available capability and risk. Some faults permit continued operation at reduced speed, restricted maneuverability, or increased safety margins. More serious conditions can require cancellation of the current trajectory and transition toward a fallback maneuver or Minimal Risk Condition. This produces a progression from nominal operation through degraded operation to controlled fallback instead of relying on a binary distinction between fully autonomous operation and immediate shutdown.

For an outdoor AMR, the Minimal Risk Condition may differ substantially from that of an on-road passenger vehicle. Stopping can often be appropriate, but it is not universally safe: an AMR operating on a slope, crossing an access road, occupying an intersection, or carrying a hazardous payload may require a controlled maneuver before stopping. The fallback strategy therefore needs awareness of vehicle dynamics, terrain, surrounding agents, available stopping space, communications, and the specific ODD.

Safety must also extend downward into control and actuation. Emergency braking, command arbitration, drive-by-wire monitoring, steering or differential-drive constraints, motor-controller feedback, and independent emergency-stop paths form the final protective layers between software decisions and physical motion. The preceding control chapter explicitly includes drive-by-wire interfaces and emergency brake and override logic, providing direct interfaces between nominal control and the safety architecture developed here.

The safety architecture is complemented by systematic verification and validation. Scenario-based testing explores combinations of environment, actors, vehicle state, sensor conditions, and triggering events that may expose unsafe behavior. Simulation enables large-scale exploration, while software-in-the-loop, hardware-in-the-loop, proving-ground tests, and field operation progressively introduce physical realism. Operational data can then reveal rare combinations that were not adequately represented during initial development.

A central SOTIF challenge is the transition from unknown unsafe scenarios toward known and controlled scenarios. Developers begin with identified limitations and known hazardous situations, but testing and operational evidence are used to discover previously unknown triggering conditions. These discoveries feed back into requirements, ODD restrictions, perception models, planning policies, monitoring logic, datasets, and validation scenarios, making safety engineering an iterative process rather than a one-time certification activity.

Evidence produced throughout this process should be organized into a safety case linking claims, arguments, requirements, analyses, tests, and operational evidence. The chapter structure therefore progresses from runtime mechanisms and redundancy through scenario and data-driven validation to safety-case development. The objective is not merely to demonstrate that individual components passed tests, but to establish traceable evidence that architectural safety claims are supported.

SOTIF should also be understood as complementary to, rather than a replacement for, other safety disciplines. Functional safety addresses malfunctioning behavior, SOTIF addresses insufficiencies of intended functionality, and cybersecurity engineering addresses threats that can compromise trusted operation. Mechanical safety, electrical protection, operational procedures, remote intervention, and application-specific machinery requirements may add further layers. A production autonomy system therefore requires a coordinated safety framework rather than dependence on a single standard.

For Physical AI and increasingly learning-based autonomy, this architectural approach becomes even more important. Learned perception and decision components can exhibit uncertainty, distribution shift, and unexpected behavior that cannot always be represented by deterministic fault models. Safety supervision must therefore combine conventional diagnostics with confidence monitoring, plausibility checks, independent constraints, ODD monitoring, fallback policies, and continuous collection of safety-relevant operational evidence.

The broader volume deliberately separates this architectural overview from the later chapter devoted specifically to SOTIF and safety validation. That later structure expands into intended behavior, hazard analysis, scenario-based testing, discovery of unknown unsafe scenarios, fleet-data corner-case mining, simulation coverage, statistical validation, documentation, and continuous production monitoring. The present safety architecture provides the system foundation on which those validation activities operate.

Ultimately, an AV safety architecture should create multiple opportunities to prevent a hazardous outcome. Reliable nominal autonomy is the first layer; uncertainty detection, redundancy, runtime supervision, constraint enforcement, degraded operation, fallback planning, and independent intervention provide successive defenses. SOTIF adds the critical recognition that correct execution does not guarantee safe behavior, making continuous analysis of functional limitations and real operating conditions indispensable for autonomous vehicles and outdoor AMRs.

09.02. Runtime Safety Monitor Design for AV SW [w/Code]

Runtime safety monitoring is a supervisory capability that observes an autonomous vehicle software stack while the vehicle is operating and determines whether its behavior remains within predefined safety constraints. Unlike offline verification, a runtime monitor evaluates live system states, confidence values, timing behavior, and command outputs. Its purpose is to detect abnormal or unsafe conditions early enough for the system to restrict, degrade, override, or terminate autonomous operation.

The monitor should be architecturally separated from the nominal autonomy functions whenever practical. Perception, localization, prediction, planning, and control modules may contain complex algorithms whose internal failures are difficult to diagnose directly. A safety monitor therefore focuses on externally observable properties and safety invariants rather than reproducing the complete autonomy computation. This separation also reduces the possibility that one software defect disables both nominal operation and its safety supervision.

Runtime monitoring begins with systematic observation of system health. Sensor availability, message frequency, timestamps, processing latency, CPU and GPU utilization, memory status, network communication, controller heartbeat, actuator feedback, and power conditions can indicate whether the autonomy platform remains operational. Monitoring these signals establishes a basic health layer that can identify missing data, frozen processes, excessive latency, communication loss, or abnormal resource consumption before they propagate into vehicle motion.

Data freshness is particularly important in autonomous vehicle software. A perception result may be numerically valid but unsafe if it describes a scene observed hundreds of milliseconds earlier. Runtime monitors should therefore evaluate timestamps, message age, update frequency, synchronization error, and end-to-end latency. When information becomes stale, the monitor can invalidate the affected data or reduce the allowable operating capability instead of allowing downstream modules to treat outdated information as current.

Perception monitoring evaluates whether environmental understanding remains sufficiently reliable for continued operation. The monitor can observe detection confidence, object consistency, free-space availability, sensor agreement, tracking stability, and uncertainty estimates. It does not necessarily determine the correct interpretation of every object. Instead, it detects conditions in which the perception system lacks enough reliable evidence to support safe planning, such as severe sensor degradation or persistent disagreement among sensing modalities.

Localization requires similar supervision because an apparently plausible pose can still be dangerously inaccurate. Runtime checks can compare localization confidence, covariance, GNSS quality, IMU consistency, map matching, wheel odometry, and independent localization sources. Sudden pose jumps, excessive covariance, inconsistent velocity estimates, or divergence between redundant sources can trigger degraded operation. The safety response should depend on how much positioning capability remains and on the requirements of the current Operational Design Domain.

Planning monitors examine whether proposed trajectories satisfy explicit safety constraints before they reach the controller. Typical checks include collision clearance, drivable-area boundaries, speed limits, acceleration and deceleration limits, curvature, stopping distance, predicted time to collision, and trajectory continuity. This creates an independent verification boundary between complex planning algorithms and physical vehicle motion. A trajectory that violates a critical invariant can be rejected even if the planner itself reports successful computation.

Control monitoring extends supervision from planned motion to actual vehicle response. Steering commands, wheel speeds, acceleration, braking, yaw rate, motor current, actuator status, and measured vehicle motion can be compared against expected behavior. A persistent difference between commanded and measured states may indicate actuator degradation, traction loss, mechanical problems, communication errors, or controller instability. The monitor can then limit commands or initiate an appropriate fallback before tracking errors become hazardous.

A runtime safety monitor should distinguish faults from temporary uncertainty whenever possible. A short-lived confidence reduction caused by a shadow, packet delay, or momentary wheel slip should not necessarily produce an emergency stop. Persistence timers, hysteresis, filtering, confidence accumulation, and multi-signal reasoning can prevent excessive intervention. At the same time, critical conditions such as imminent collision or loss of braking capability may require immediate action without waiting for temporal confirmation.

Safety rules can be represented as invariants defining conditions that must remain true during operation. Examples include maintaining minimum obstacle clearance, keeping commanded speed below the context-dependent limit, preventing trajectories outside the permitted operating region, and ensuring that required sensor information remains sufficiently fresh. Such invariants provide a simpler and more auditable supervision mechanism than attempting to verify every internal decision made by an increasingly complex autonomous driving stack.

Monitoring outputs should be converted into explicit safety states rather than isolated warning messages. A practical state model may include nominal, caution, degraded, fallback, minimal-risk, and emergency states. Each transition can be associated with entry conditions, persistence requirements, permitted vehicle capabilities, recovery conditions, and escalation rules. This approach prevents individual modules from independently selecting incompatible safety responses and provides a coherent system-level interpretation of detected abnormalities.

Degraded operation is useful when sufficient capability remains for controlled motion. Loss of one camera, temporary GNSS degradation, reduced perception range, or elevated localization uncertainty may justify reduced speed and larger safety margins rather than immediate shutdown. The runtime monitor therefore needs a capability model that relates available sensors and software functions to permitted behaviors. Safety becomes a controlled adjustment of operating authority according to remaining system capability.

When the remaining capability is insufficient, the monitor should request or enforce a fallback maneuver leading toward a Minimal Risk Condition. The response may include slowing down, stopping in a safe region, leaving a conflict area, requesting remote assistance, or activating an independent emergency stop. For outdoor AMRs, the correct response depends strongly on terrain, traffic interaction, payload, stopping distance, communication availability, and whether stopping at the current location would itself introduce additional risk.

The safety monitor must also supervise software execution timing because correct algorithms can become unsafe when deadlines are missed. Watchdogs and heartbeat mechanisms can detect crashed, blocked, or unresponsive processes, while deadline monitors identify excessive execution time. End-to-end timing supervision can verify that sensing, perception, planning, and control complete within the latency budget required for the current speed. Repeated deadline violations can therefore trigger speed reduction or transition to fallback operation.

Communication between the monitor and nominal autonomy stack should use clearly defined interfaces. Safety-relevant messages need explicit timestamps, validity indicators, confidence information, source identification, and state semantics. The monitor should avoid depending on undocumented internal variables whose meaning changes with software revisions. Stable safety interfaces make it easier to modify perception or planning algorithms while preserving the supervisory architecture and its verification evidence.

Implementation should minimize the complexity of the safety monitor itself. A monitor containing equally complex AI models, planning algorithms, and dependencies can reproduce the same failure modes as the primary system and become difficult to validate. Whenever possible, critical checks should use deterministic logic, bounded computations, geometric constraints, threshold tests, state machines, and independently derived signals. More sophisticated monitors can be added where necessary, but their additional complexity must provide measurable safety value.

Logging and traceability are essential because runtime monitoring also generates evidence for safety engineering. Every intervention should record the triggering signals, system state, relevant sensor status, monitor decision, commanded response, and subsequent recovery or escalation. These records support incident analysis, scenario reconstruction, threshold tuning, corner-case mining, regression testing, and safety-case development. Fleet operation can therefore transform runtime monitoring events into a continuous source of validation data.

The runtime safety monitor ultimately acts as a boundary between autonomy intelligence and permitted physical behavior. It does not replace reliable perception, planning, control, functional safety, or SOTIF engineering. Instead, it provides an independent operational layer that continuously asks whether the information, decisions, timing, and vehicle responses remain acceptable. By combining health supervision, safety invariants, capability assessment, controlled degradation, fallback, and traceable intervention, autonomous vehicle software can fail more predictably and safely.

09.03. Sensor Redundancy and Voting for AV Safety [w/Code]

Sensor redundancy is a fundamental safety mechanism for autonomous vehicles because no individual sensing technology can provide reliable environmental information under every operating condition. Cameras, LiDAR, radar, ultrasonic sensors, GNSS, IMUs, and wheel odometry exhibit different strengths and failure characteristics. A safety-oriented architecture combines these complementary sources so that degradation or loss of one sensor does not immediately eliminate the vehicle's ability to perceive, localize, and operate safely.

Redundancy should not be understood simply as installing multiple identical sensors. Identical devices can improve availability when failures are independent, but they may remain vulnerable to common-cause failures such as weather, contamination, electromagnetic interference, software defects, or shared power loss. Diverse redundancy uses different sensing principles and independent processing paths, reducing the probability that a single environmental condition or implementation defect simultaneously invalidates all safety-relevant observations.

Camera sensors provide rich color, texture, semantic, and object-class information but can degrade under darkness, glare, fog, rain, or lens contamination. LiDAR provides accurate geometric range measurements and three-dimensional structure but may suffer from precipitation, reflective surfaces, contamination, or limited return characteristics. Radar offers robust range and relative-velocity information under many adverse conditions, while its spatial resolution and semantic information can be more limited than those of cameras or LiDAR.

Localization requires another form of sensor redundancy. GNSS can provide globally referenced position but may become unreliable near buildings, under vegetation, inside tunnels, or during interference and jamming. IMUs provide high-rate inertial information but accumulate drift, while wheel odometry can be affected by slip and terrain conditions. Combining GNSS, IMU, wheel encoders, LiDAR localization, and visual localization enables the system to cross-check estimates and maintain useful positioning capability when individual sources deteriorate.

A redundant sensor architecture requires continuous health assessment before measurements participate in safety decisions. Hardware status, message frequency, timestamps, signal quality, temperature, communication errors, calibration state, measurement covariance, and plausibility can all contribute to sensor-health estimation. A sensor that continues transmitting data is not necessarily healthy. Frozen values, excessive noise, stale timestamps, calibration drift, or physically implausible measurements must therefore be detectable by the supervision layer.

Cross-sensor consistency checking provides an important mechanism for identifying hidden failures. Measurements from different modalities can be transformed into a common spatial or semantic representation and compared for agreement. Radar detections can be compared with LiDAR objects, camera detections with projected point clouds, and GNSS motion with inertial and wheel-derived motion. Persistent disagreement does not automatically identify which sensor is wrong, but it indicates that confidence in the combined estimate should be reduced.

Voting mechanisms convert redundant observations into a system-level decision. Simple majority voting is appropriate when several independent channels produce comparable discrete states, such as valid or invalid, occupied or free, or obstacle present or absent. If three independent channels produce the same type of safety decision, a two-out-of-three scheme can tolerate one disagreeing channel. However, autonomous vehicle sensors usually generate continuous and heterogeneous information, making naive majority voting insufficient for many perception tasks.

Weighted voting addresses differences in sensor reliability by assigning greater influence to observations with higher confidence. Weights may depend on sensor health, environmental conditions, measurement uncertainty, distance, visibility, or historical performance. A camera may receive lower confidence at night, while radar can retain greater influence for velocity estimation. The weighting strategy should remain bounded and interpretable so that a temporarily overconfident algorithm cannot dominate a safety-critical decision without appropriate checks.

For continuous measurements such as position, velocity, distance, or orientation, redundancy is often implemented through estimation and fusion rather than literal voting. Kalman filters, extended or unscented Kalman filters, Bayesian estimators, and other fusion methods combine observations according to their uncertainties. Safety supervision should remain separate from the estimator itself, because a mathematically consistent fused output can still be incorrect when several inputs share correlated errors or incorrect assumptions.

Outlier rejection is therefore an essential component of sensor voting. Residual tests, innovation bounds, geometric consistency checks, temporal continuity, physical limits, and robust statistical methods can identify measurements that differ substantially from expected behavior. Rejected observations should not simply disappear from the system. Their rejection should update sensor-health status and contribute to determining whether the remaining sensing configuration still satisfies the minimum capability required for autonomous operation.

Voting must also consider correlated and common-mode failures. Two cameras using the same image-processing software may agree because both experience the same algorithmic error, while multiple GNSS receivers can simultaneously report incorrect positions under spoofing or shared satellite conditions. Consequently, the number of agreeing channels alone does not determine safety confidence. Architectural diversity, independent algorithms, separate power and communication paths, and different physical sensing principles strengthen the meaning of agreement.

Sensor redundancy should be connected to a capability model that describes which autonomous functions remain available under each sensor configuration. Loss of one peripheral camera may permit continued low-speed operation, while loss of all forward ranging sensors may eliminate safe obstacle avoidance. Localization degradation may restrict the vehicle to a reduced operating area or require stopping. The system therefore maps sensor availability and confidence to permitted speed, maneuvering authority, and Operational Design Domain constraints.

Graceful degradation is preferable to uncontrolled continuation or unnecessary emergency intervention. When redundancy absorbs a single failure, the vehicle may continue normally while recording the degraded state. As additional sensors become unavailable, the system can reduce speed, enlarge obstacle margins, restrict maneuvers, or disable specific autonomous functions. If the remaining sensing capability falls below a defined safety threshold, the runtime safety monitor should initiate fallback behavior leading toward a Minimal Risk Condition.

Sensor voting also requires careful temporal alignment. Two correct measurements acquired at significantly different times may appear inconsistent when the vehicle or surrounding objects are moving rapidly. Hardware timestamps, synchronized clocks, interpolation, motion compensation, and bounded communication latency are therefore part of the redundancy architecture. Voting logic should compare observations representing approximately the same physical state rather than treating asynchronous measurements as simultaneous evidence.

Calibration integrity is equally important because redundant sensors must share consistent spatial relationships. Incorrect extrinsic calibration between camera, LiDAR, radar, and vehicle coordinate frames can create systematic disagreement that resembles sensor failure. Runtime calibration monitoring can detect changes in relative orientation or position caused by vibration, impact, maintenance, or mounting deformation. Safety logic should distinguish calibration degradation from transient measurement noise whenever sufficient evidence exists.

Redundant sensing should extend through the processing architecture rather than ending at physical sensors. Two sensors connected through the same communication switch, compute process, power rail, or software driver may share a single point of failure. Safety-oriented design therefore examines independence across sensing hardware, power supply, communication, preprocessing, fusion, and decision paths. The objective is to prevent apparently redundant channels from becoming unavailable because of one shared infrastructure failure.

Every redundancy decision should be observable and traceable. The system should record sensor-health states, confidence values, voting results, rejected measurements, disagreement events, active sensor configurations, and resulting safety-state transitions. These records support failure analysis, threshold tuning, scenario reconstruction, regression testing, and safety-case evidence. Fleet data can also reveal recurring combinations of weather, terrain, sensor condition, and software behavior that were not anticipated during development.

Validation must deliberately inject sensor faults rather than relying only on naturally occurring failures. Simulation, software-in-the-loop, hardware-in-the-loop, and vehicle testing can introduce dropped messages, frozen measurements, noise, bias, calibration errors, latency, communication loss, partial field-of-view obstruction, and complete sensor failure. Tests should verify not only whether voting detects the fault, but also whether capability assessment, degradation, fallback, and recovery behave correctly after detection.

Ultimately, sensor redundancy and voting provide safety through diversity, supervision, and controlled decision authority rather than through sensor quantity alone. A robust autonomous vehicle architecture continuously evaluates which observations are trustworthy, determines whether independent sources agree, rejects implausible information, and assesses the capability remaining after degradation. By connecting these decisions to runtime monitoring, degraded operation, and fallback behavior, sensing failures can be transformed from unpredictable hazards into manageable system states.

09.04. Fallback Planner and Minimal Risk Condition MRC [w/Code]

A fallback planner is a dedicated safety component that determines how an autonomous vehicle should transition from normal or degraded operation toward a safer state when the primary autonomy system can no longer guarantee acceptable behavior. Unlike the nominal planner, which optimizes progress, efficiency, comfort, and mission objectives, the fallback planner prioritizes risk reduction, controllability, stopping feasibility, and preservation of essential vehicle functions.

Fallback planning is closely connected to runtime safety monitoring. The safety monitor observes perception confidence, localization quality, sensor availability, planning validity, control performance, communication status, computation health, and actuator feedback. When these indicators exceed predefined safety limits, the monitor determines that nominal autonomy is no longer sufficiently trustworthy and requests a transition to degraded operation or activates the fallback planner according to the severity of the detected condition.

The Minimal Risk Condition, or MRC, represents a system state reached after performing a Minimal Risk Maneuver when continued autonomous operation is no longer appropriate. An MRC should not be interpreted simply as stopping the vehicle immediately. The safest achievable state depends on the vehicle, environment, Operational Design Domain, current motion, surrounding traffic, terrain, payload, available sensing capability, and the nature of the failure that initiated the fallback process.

For an autonomous passenger vehicle, a suitable fallback may involve controlled deceleration and stopping in an appropriate location. For an outdoor AMR, stopping immediately can sometimes create additional risk. A robot crossing an access road, operating on a steep slope, blocking an industrial intersection, transporting a heavy payload, or moving near workers may need to leave a conflict area or reach stable terrain before stopping. MRC design must therefore remain application and context dependent.

Fallback activation begins with detection and classification of the triggering condition. Sensor loss, localization uncertainty, stale perception data, trajectory-generation failure, controller malfunction, excessive latency, communication loss, compute failure, actuator degradation, or departure from the permitted ODD can require different responses. The safety architecture should classify whether the condition is temporary, recoverable, progressively degrading, or immediately hazardous before selecting the corresponding fallback strategy.

A capability assessment provides the bridge between fault detection and fallback planning. Instead of reasoning only about which component failed, the system evaluates which autonomous capabilities remain available. Loss of GNSS may still permit local navigation using LiDAR and inertial localization, while severe degradation of all forward perception channels may remove safe obstacle-avoidance capability. Fallback behavior should therefore be selected according to remaining functional capability rather than fault identity alone.

A useful architecture separates fallback responses into progressive safety levels. Minor degradation may permit continued operation with reduced speed, increased obstacle clearance, restricted maneuvering, or a smaller permitted operating region. More serious degradation may require mission cancellation and controlled movement toward a predefined safe area. When the remaining capability cannot support such movement, the system should execute the safest feasible stop or activate an independent emergency intervention mechanism.

The fallback planner must operate under stricter assumptions than the nominal planner because some of the information normally used for planning may already be unavailable or unreliable. A sophisticated planner depending on detailed semantic perception, high-definition maps, and precise localization may not be suitable after those capabilities have degraded. Fallback planning should therefore use the simplest reliable information that remains available, together with conservative constraints and independently monitored safety boundaries.

Trajectory generation during fallback should prioritize feasibility and risk reduction rather than nominal driving quality. Candidate maneuvers can be evaluated using collision clearance, stopping distance, vehicle stability, road or terrain boundaries, actuator limitations, predicted interaction with nearby agents, and confidence in the available perception and localization information. Acceleration, steering, curvature, and speed constraints should become increasingly conservative as system capability decreases.

Stopping-distance estimation is particularly important because a fallback maneuver must remain physically achievable. Current velocity, vehicle mass, road gradient, tire or wheel traction, surface condition, braking capability, actuator delay, control latency, and payload can influence the required stopping distance. Outdoor AMRs operating on gravel, wet pavement, slopes, or uneven terrain may require substantially different safety margins from those calculated for stable, high-friction surfaces.

Fallback planning also needs explicit handling of dynamic obstacles and other road users. A technically feasible stopping trajectory may still be unsafe if it places the vehicle directly in the path of another vehicle, pedestrian, or mobile robot. The planner should therefore consider predicted occupancy and conflict regions while sufficient perception capability remains. When prediction becomes unreliable, conservative assumptions and larger spatial margins can reduce dependence on uncertain behavior estimates.

The transition between the nominal planner and fallback planner must be deterministic and carefully controlled. Command arbitration should ensure that only one authority controls vehicle motion at a given time and that stale commands from the nominal planner cannot overwrite fallback commands. Safety state, planner authority, trajectory validity, timestamps, and actuator acknowledgements should be explicitly communicated so that the system can verify that the requested fallback behavior is actually being executed.

A fallback planner should also define recovery conditions. Some triggering events, such as temporary communication interruption, short GNSS degradation, or transient sensor obstruction, may disappear before an MRC is reached. Immediate return to full autonomy can create unstable switching between operating modes. Persistence timers, hysteresis, health stabilization periods, and capability revalidation can ensure that recovery occurs only after the required functions have remained trustworthy for a sufficient period.

Remote assistance can form part of a fallback architecture, particularly for outdoor AMRs operating in controlled industrial environments. The autonomous system may stop in a safe state and request operator guidance when local planning cannot resolve the situation. However, remote intervention should not be treated as an instantaneous safety mechanism because communication may be delayed or unavailable. The vehicle must first maintain or reach a condition that remains safe while assistance is requested.

Independent emergency stopping remains the final protective layer when controlled fallback cannot be guaranteed. This path should minimize dependence on the failed autonomy functions and may use dedicated safety controllers, emergency-stop circuits, independent obstacle sensors, or hardware-level braking interfaces. Emergency stopping is not equivalent to normal fallback planning; it is the last intervention used when the available time or remaining capability is insufficient for a more controlled Minimal Risk Maneuver.

For outdoor AMRs, MRC definitions can be represented as several context-specific terminal states rather than one universal stop state. Examples include stationary in a designated safe zone, stopped outside a vehicle lane, stabilized on suitable terrain, motors disabled with brakes engaged, payload secured, or waiting for remote recovery. Defining these states explicitly allows the fallback planner to reason about achievable safety objectives instead of treating zero velocity as the only measure of safety.

Fallback events must be recorded with sufficient context for later safety analysis. Logs should include the initiating fault or uncertainty, sensor and localization health, safety state, available capabilities, selected fallback strategy, generated trajectory, actuator response, time required to reach the MRC, and any recovery attempt. These records support scenario reconstruction, fault analysis, regression testing, threshold refinement, fleet-level corner-case mining, and development of safety-case evidence.

Validation should test the complete fallback sequence rather than only the planner algorithm. Simulation, software-in-the-loop, hardware-in-the-loop, proving-ground tests, and field testing can inject sensor failures, localization loss, communication interruption, compute overload, actuator degradation, blocked routes, and dynamic obstacles. Evaluation should verify detection, capability assessment, planner transition, command arbitration, trajectory feasibility, MRC achievement, recovery logic, and emergency escalation as one integrated safety process.

The fallback planner ultimately transforms autonomy degradation into controlled risk reduction. Its purpose is not merely to stop the vehicle but to determine what safe behavior remains achievable with the capabilities still available. By linking runtime monitoring, capability assessment, conservative planning, command arbitration, degraded operation, Minimal Risk Maneuvers, MRC definitions, recovery logic, and independent emergency intervention, the autonomous system can respond predictably when nominal operation can no longer be trusted.

09.05. Watchdog and Heartbeat for AV Safety SW [w/Code]

A watchdog is a safety mechanism that detects whether a critical autonomous-driving software component continues to execute as expected. An autonomous vehicle depends on many processes operating within defined timing and availability requirements, including perception, localization, planning, control, communication, and safety supervision. A process can fail by crashing, freezing, deadlocking, entering an infinite loop, or becoming excessively delayed. A watchdog provides an independent means of recognizing such execution failures.

A heartbeat is a periodic indication that a software component is alive and functioning sufficiently to continue operating. The heartbeat should not merely indicate that a process is running; for safety-critical supervision, it should provide evidence that the monitored function is progressing through its expected execution cycle. A process that remains alive while producing stale outputs may continue sending superficial status signals, so heartbeat design must be connected to execution progress, data freshness, and functional validity.

The watchdog and heartbeat architecture should be designed around explicit timing requirements. Each monitored component can have an expected execution period, an allowable response deadline, and an acceptable tolerance for temporary timing variation. If a heartbeat arrives within the expected interval, the component can remain in its current safety state. If the heartbeat becomes late, stops, or indicates an invalid execution state, the supervisor can classify the condition according to severity and initiate an appropriate safety response.

Different autonomous functions require different monitoring characteristics. A high-frequency control loop may require relatively tight timing supervision, while a slower mission-management function may tolerate longer intervals. Perception pipelines can also have variable execution times depending on sensor load and computational demand. Therefore, a single global watchdog timeout is generally insufficient. Monitoring should reflect the timing budget and safety importance of each function while maintaining clear system-level rules for escalation.

A robust heartbeat should contain more information than a simple alive flag. It can include a sequence counter, timestamp, software state, execution-cycle identifier, data-validity status, and diagnostic information. Sequence numbers can reveal repeated or missing cycles, while timestamps allow the supervisor to evaluate data age and communication delay. State information can distinguish initialization, normal operation, degraded operation, shutdown, and fault conditions. These elements make heartbeat monitoring more useful for safety supervision and post-event analysis.

The watchdog itself should have sufficient independence from the software it supervises. If the monitored process controls the same resources required by the watchdog, a common failure could prevent both detection and response. Depending on the required safety architecture, supervision can be implemented through an independent process, separate processor, microcontroller, safety controller, hardware timer, or other appropriately isolated mechanism. The required degree of independence depends on the system safety goals and applicable engineering requirements.

Watchdog supervision should cover both process liveness and functional progress. A process may continue responding to operating-system checks while its internal computation has become blocked or its output has stopped updating. Functional heartbeats can therefore be generated only after a critical processing cycle has completed successfully. For example, a perception component might update its heartbeat only after receiving valid sensor data, completing processing, publishing a new result, and passing basic internal validity checks.

Communication paths also require watchdog supervision. Autonomous-driving software is often distributed across multiple processes, computers, networks, and middleware components. A healthy application may become ineffective if messages are delayed, lost, duplicated, or delivered out of sequence. Monitoring should therefore consider communication heartbeat, message freshness, sequence continuity, transport status, and end-to-end latency. This allows the safety architecture to distinguish an application failure from a communication-path failure and select an appropriate response.

Watchdog responses should be connected to the system safety-state model. A single missed heartbeat does not necessarily require an immediate emergency stop because transient scheduling delays, temporary computational overload, or network jitter can occur. Persistence thresholds, consecutive-miss counters, hysteresis, and fault classification can prevent unnecessary intervention. Conversely, repeated missed deadlines or simultaneous failures in safety-critical functions should cause escalation toward degraded operation, fallback planning, Minimal Risk Condition, or emergency intervention.

Recovery behavior is an important part of watchdog design. After a monitored process fails, the system may attempt a controlled restart if the function can safely recover without compromising vehicle behavior. Restarting a process should not automatically return the vehicle to full autonomous operation. The system should first verify initialization, sensor availability, data validity, synchronization, functional outputs, and safety-state conditions. Only after capability has been revalidated should the affected function regain operational authority.

Watchdog and heartbeat events should be logged with precise timing and system context. Records can include the monitored component, expected heartbeat period, observed interval, missed-cycle count, sequence information, processor or communication status, active safety state, and resulting intervention. Such evidence supports root-cause analysis, fault reproduction, regression testing, threshold adjustment, and safety-case development. In fleet operation, repeated watchdog events can also reveal workload-dependent failures or environmental conditions associated with software instability.

Testing should intentionally reproduce watchdog-relevant failures rather than relying only on naturally occurring faults. Software-in-the-loop, hardware-in-the-loop, simulation, and vehicle testing can introduce process crashes, deadlocks, infinite loops, CPU overload, GPU overload, memory exhaustion, communication delays, dropped messages, frozen outputs, clock errors, and excessive execution latency. Testing should verify not only detection but also the complete response chain from fault recognition through safety-state transition, command handling, recovery, fallback, and emergency escalation.

For autonomous vehicles and outdoor AMRs, watchdog design should ultimately be viewed as part of a broader runtime safety architecture. The watchdog determines whether critical software continues to execute within its required temporal and functional boundaries, while the runtime safety monitor determines what the vehicle should do when those boundaries are violated. Their integration creates a clear chain from heartbeat generation and deadline supervision to fault classification, capability assessment, degraded operation, fallback planning, and Minimal Risk Condition.

The essential principle is that software being "alive" is not equivalent to software being "safe." A reliable safety architecture must determine whether critical functions are executing, producing fresh and valid outputs, meeting timing requirements, and communicating correctly. By combining independent watchdog mechanisms, meaningful functional heartbeats, deadline monitoring, fault persistence logic, controlled recovery, and traceable safety responses, autonomous-driving software can detect execution failures early and prevent silent software degradation from propagating into unsafe physical behavior.

09.06. Safety Cage Intervention Override Logic [w/Code]

A safety cage is an independent supervisory boundary that constrains autonomous vehicle behavior when the nominal autonomy stack approaches or violates predefined safety limits. It does not attempt to replace perception, planning, or control. Instead, it observes safety-relevant states and commands and determines whether those commands remain physically and operationally acceptable. When necessary, the safety cage can restrict, modify, reject, or override a nominal command before it reaches the vehicle actuators.

The safety cage extends the runtime safety architecture by creating a final software-level protection layer between autonomous decision-making and physical vehicle motion. Perception, localization, planning, control, communication, and system-health information can provide inputs to the cage. The cage evaluates these inputs against explicit safety constraints such as maximum speed, stopping distance, obstacle clearance, drivable-area boundaries, steering limits, acceleration limits, and actuator availability.

A critical design principle is that the safety cage should not reproduce the complete autonomous driving stack. Reimplementing perception or planning inside the safety mechanism would increase complexity and could reproduce the same failure modes. Instead, the cage should use relatively simple, deterministic, and independently verifiable rules whenever practical. Its responsibility is to determine whether an already generated command is permitted, not to determine the complete optimal driving strategy under every possible situation.

Intervention begins when a monitored condition indicates that nominal behavior can no longer be accepted without additional restriction. Examples include an invalid trajectory, insufficient obstacle clearance, excessive commanded speed, localization uncertainty beyond an allowed limit, stale perception information, actuator disagreement, communication failure, or loss of a required safety capability. The intervention threshold should be explicitly defined so that the transition from normal operation to restricted authority is predictable and traceable.

Override logic determines what happens after a violation or imminent violation is detected. A low-severity condition may result in command limiting, such as reducing maximum speed or acceleration. A more serious condition may reject the current trajectory and transfer authority to a fallback planner. If controlled fallback is no longer feasible, the safety cage may command a controlled stop or activate an independent emergency mechanism. The response therefore depends on both the severity of the condition and the remaining vehicle capability.

Command arbitration is essential because multiple software components may attempt to influence vehicle motion simultaneously. The safety architecture must establish a clear authority hierarchy between the nominal controller, degraded controller, fallback planner, remote operator, and emergency system. A lower-priority command must not overwrite a safety intervention that has already been activated. Authority transitions should include explicit state information, command validity, timestamps, and acknowledgement so that the actual control path remains observable.

Safety constraints should be expressed in terms that can be evaluated independently of complex AI behavior. A generated trajectory can be checked against geometric boundaries, obstacle distances, maximum curvature, speed limits, acceleration constraints, and stopping feasibility. Control commands can be checked against actuator limits and vehicle-state constraints. These checks create a safety envelope around nominal behavior and allow the system to reject commands that are computationally valid but physically unacceptable.

The safety cage should also account for the quality of the information used to evaluate a command. A trajectory may appear safe when based on accurate and recent perception but become unsafe when the underlying sensor data are stale or uncertain. Sensor health, localization confidence, timestamp validity, communication status, and watchdog state can therefore influence the authority granted to the nominal controller. Reduced information quality should generally lead to reduced operational authority rather than unrestricted continuation.

Intervention logic should avoid unnecessary oscillation between nominal operation and override states. Temporary violations can occur because of sensor noise, communication jitter, or short-duration computational delays. Persistence conditions, hysteresis, temporal filtering, and recovery confirmation can prevent repeated switching. At the same time, conditions involving immediate collision risk, loss of braking capability, or a critical safety violation may require immediate intervention without waiting for persistence.

Recovery after intervention must be treated as a controlled safety transition. Clearing the original trigger does not automatically mean that nominal autonomy is trustworthy again. The system should verify that the relevant sensors, localization, planning, control, communication, and actuator functions have returned to acceptable conditions. Capability revalidation and a stabilization period can then determine whether authority may gradually return to the nominal system or whether the vehicle should remain in degraded or fallback operation.

For outdoor AMRs, the safety cage should incorporate the physical and operational characteristics of the platform. Terrain, slope, payload, traction, stopping distance, vehicle width, obstacle height, surrounding workers, and restricted areas can influence whether a command is safe. A simple emergency stop may be appropriate in one environment but undesirable in another if stopping would leave the robot on unstable terrain or inside a conflict area. Safety constraints therefore need to reflect the actual operating context and ODD.

The safety cage should have an independent path to emergency intervention when software-level command limiting cannot provide sufficient protection. Depending on the architecture, this can connect to a dedicated safety controller, emergency-stop circuit, braking interface, motor-disable mechanism, or other appropriately independent control path. The purpose is to provide a final layer of protection when the nominal software, fallback planner, or communication system cannot reliably guarantee safe motion.

Testing the safety cage requires deliberate violation and fault-injection scenarios. Simulation, software-in-the-loop, hardware-in-the-loop, and vehicle testing can introduce excessive speed commands, invalid trajectories, sensor failures, localization errors, stale messages, communication loss, actuator disagreement, blocked paths, and rapidly developing obstacles. The evaluation should verify not only that the cage detects violations but also that command arbitration, intervention timing, fallback activation, emergency escalation, and recovery operate correctly as an integrated chain.

Every intervention should generate traceable evidence. The system should record the triggering condition, relevant sensor and localization states, commanded trajectory, safety constraints evaluated, intervention decision, command actually delivered to the actuator interface, resulting vehicle response, and subsequent recovery state. These records support failure analysis, regression testing, threshold refinement, scenario reconstruction, and safety-case development. Repeated intervention patterns can also identify weaknesses in upstream perception, planning, or control functions.

The safety cage ultimately provides controlled separation between autonomy intelligence and physical authority. Normal autonomy is permitted to operate within a defined safety envelope, while the cage continuously verifies that the resulting behavior remains within that envelope. When the boundary is approached or crossed, the system can limit commands, transfer authority, activate fallback planning, or initiate emergency intervention. This architecture allows increasingly complex autonomous software to operate while retaining an independent mechanism capable of preventing unsafe commands from directly becoming unsafe physical motion.

09.07. Scenario Based Safety Testing and Coverage

Scenario-based safety testing provides a structured way to evaluate whether an autonomous vehicle remains safe across representative, adverse, and safety-critical operating situations. Within the Chapter 09 structure, this topic follows runtime supervision, sensor redundancy, fallback planning, watchdog mechanisms, and safety-cage intervention, and precedes data-driven safety validation. It therefore connects architectural safety mechanisms with systematic testing by asking whether those mechanisms continue to work correctly when the vehicle encounters different combinations of environment, system state, uncertainty, and failure conditions.

A scenario represents a defined situation in which autonomous behavior can be evaluated under controlled conditions. It may describe the environment, road or terrain structure, static objects, dynamic agents, vehicle state, sensor conditions, mission context, and relevant system events. A useful safety scenario is not simply a test route. It specifies the conditions and interactions that could influence safety, allowing the same situation to be reproduced across simulation, hardware-in-the-loop testing, proving-ground experiments, and controlled field operation.

Scenario testing should begin with the intended operational context and the boundaries of the Operational Design Domain. Conditions such as road geometry, terrain, weather, illumination, traffic density, pedestrian presence, infrastructure, speed, and communication availability can substantially change the safety behavior of an autonomous system. Testing should therefore represent both ordinary operating conditions and conditions near the limits of the defined ODD, where sensing uncertainty, planning difficulty, and fallback requirements can become more significant.

Safety scenarios should contain meaningful variations rather than a collection of isolated examples. A basic obstacle-avoidance situation can be expanded by changing obstacle position, relative velocity, vehicle speed, visibility, road surface, sensor availability, and localization quality. Combining these dimensions creates a scenario space in which safety behavior can be examined under different circumstances. The objective is not to enumerate every theoretically possible combination, but to identify combinations that are relevant to safety claims and system limitations.

A useful distinction exists between nominal, degraded, critical, and failure-oriented scenarios. Nominal scenarios examine whether normal autonomous functions behave correctly under expected conditions. Degraded scenarios introduce reduced sensor quality, increased uncertainty, communication delays, or limited computational capability. Critical scenarios place the vehicle close to safety boundaries, while failure-oriented scenarios deliberately introduce faults or functional limitations. Together, these categories allow testing to examine both normal performance and the transitions between safety states.

Scenario parameters should include variables that directly affect vehicle risk. Initial vehicle speed, acceleration, position, heading, obstacle distance, obstacle velocity, available stopping space, road curvature, terrain slope, sensor visibility, localization uncertainty, and actuator response can all influence the outcome. For an outdoor AMR, payload, wheel traction, ground condition, worker proximity, restricted areas, and available recovery locations may also become important. Parameterization allows one scenario definition to generate many controlled test cases.

Scenario generation can be performed through structured variation, combinatorial selection, boundary-value testing, and targeted perturbation. Simple random variation may generate many cases but can waste computational resources on situations with little safety relevance. More useful approaches concentrate testing around operational boundaries, known weaknesses, safety constraints, and interactions between important variables. The scenario-generation process should therefore be guided by engineering knowledge, previous failures, safety analysis, and evidence collected from earlier validation activities.

Scenario coverage should measure more than the number of executed tests. A large collection of similar scenarios can provide poor coverage if important environmental conditions, system states, or safety boundaries remain unexplored. Coverage can be considered across ODD conditions, object interactions, vehicle states, sensor configurations, degradation modes, planning decisions, fallback states, and critical safety constraints. The purpose of coverage analysis is to identify meaningful regions of the scenario space that have not yet received sufficient evidence.

Safety requirements should be traceable to the scenarios used to evaluate them. A requirement concerning minimum obstacle clearance should correspond to scenarios that exercise obstacle distance and vehicle motion near that boundary. A fallback requirement should be evaluated using scenarios that cause the nominal system to lose the capability required for continued operation. This traceability connects requirements, hazards, scenarios, expected behavior, test results, and safety evidence, making the validation process more systematic and auditable.

Expected outcomes must be defined before executing safety-critical scenarios. A test should specify what constitutes acceptable behavior, including permitted speed, collision avoidance, trajectory validity, safety-state transitions, fallback activation, stopping behavior, and recovery conditions. The evaluation should not depend only on whether the vehicle completed its mission. An autonomous system can reach a destination while violating safety constraints, so scenario assessment must examine the complete safety behavior throughout the test.

Simulation provides an efficient environment for executing large numbers of scenarios and exploring combinations that would be expensive or dangerous to reproduce physically. Software-in-the-loop can evaluate algorithms and decision logic, while hardware-in-the-loop can introduce realistic timing, interfaces, and hardware behavior. Physical vehicle testing adds real sensor characteristics, actuator limitations, terrain interaction, and environmental uncertainty. These methods should complement one another rather than being treated as interchangeable sources of evidence.

Scenario testing should deliberately examine transitions between autonomous operating states. A vehicle may begin in nominal operation, encounter degraded perception, lose localization confidence, activate a safety intervention, transfer authority to a fallback planner, and eventually reach a Minimal Risk Condition. The test is successful only when the complete transition behaves as intended. This is especially important because many safety failures occur not within an individual subsystem but at the interfaces between detection, decision, intervention, control, and recovery.

Corner cases and rare interactions require particular attention because they may expose limitations that ordinary scenarios do not reveal. Examples include an obstacle appearing immediately after a sensor degradation event, multiple objects entering the same conflict region, localization uncertainty occurring during a maneuver, or communication loss during fallback activation. Such cases should be derived from known limitations and previous observations rather than generated solely as arbitrary extreme situations. Their results can then inform additional scenarios and future validation priorities.

Scenario results should be recorded as structured evidence rather than simple pass or fail labels. Relevant records can include scenario parameters, software and hardware versions, sensor configuration, initial conditions, system state transitions, trajectories, intervention events, timing information, safety-constraint violations, and final outcomes. This information supports reproducibility and regression testing while also creating a foundation for later data-driven safety validation. The chapter structure places naturalistic and operational-data validation immediately after scenario-based testing, allowing scenario evidence to connect naturally with field-derived evidence.

Regression testing is essential whenever autonomous-driving software changes. A modification to perception, localization, planning, control, safety monitoring, or sensor fusion can alter behavior in scenarios that previously passed validation. A maintained scenario library therefore becomes a reusable safety asset. Critical scenarios should be automatically re-executed after relevant software changes, and deviations from established safety behavior should be investigated before the updated system is accepted for further testing or deployment.

The ultimate purpose of scenario-based safety testing is not to prove that an autonomous vehicle is safe in every possible situation, which is generally not achievable through finite testing. Its purpose is to construct systematic and traceable evidence that important operating conditions, safety boundaries, degradation modes, and interactions have been explored and that the system responds according to its defined safety behavior. By connecting scenario generation, meaningful coverage, requirement traceability, expected outcomes, simulation, physical validation, regression testing, and evidence management, scenario-based testing becomes a central bridge between safety architecture and continuous safety validation.

09.08. Data Driven Safety Validation Naturalistic Data

Data-driven safety validation uses evidence collected from real or representative autonomous operation to evaluate whether safety assumptions remain valid outside predefined test scenarios. Naturalistic data captures ordinary driving, rare interactions, environmental variation, system degradation, and unexpected combinations that may be difficult to anticipate during design. It complements scenario-based testing by revealing how the autonomous system actually behaves across large populations of operational situations.

Naturalistic data can originate from development vehicles, deployed fleets, outdoor AMRs, proving-ground operations, manually driven reference vehicles, or shadow-mode autonomy systems. Relevant records may include camera images, LiDAR and radar measurements, localization estimates, vehicle states, trajectories, control commands, system-health information, intervention events, and environmental context. Accurate timestamps and synchronization are essential because safety analysis often depends on reconstructing interactions across multiple subsystems.

Raw operational data is rarely useful for safety validation without systematic processing. A data pipeline should ingest recordings, verify integrity, synchronize sensor and software streams, attach metadata, classify operating conditions, and create searchable event representations. Important contextual attributes can include location type, weather, illumination, road or terrain condition, traffic density, pedestrian activity, vehicle speed, payload, sensor configuration, software version, and autonomous operating state.

Event mining transforms continuous operational recordings into safety-relevant segments. Instead of reviewing every kilometer or operating hour equally, the system can identify events such as hard braking, emergency stops, rapid steering changes, short time-to-collision, small obstacle clearance, planner rejection, localization degradation, sensor disagreement, watchdog activation, safety-cage intervention, fallback entry, or operator takeover. These events provide concentrated evidence about conditions near the system\'s safety boundaries.

Naturalistic data is especially valuable for discovering rare and previously unknown situations. A deployed fleet may encounter unusual object configurations, unexpected pedestrian behavior, temporary construction, degraded road surfaces, unusual weather, sensor contamination, communication disturbances, or combinations of conditions that were not represented in the original scenario library. Such observations can expose assumptions that appeared reasonable during development but are incomplete under real operational conditions.

Safety validation should distinguish event frequency from event severity. A frequently occurring event may represent a benign operational characteristic, while a rare event may reveal a potentially severe safety weakness. Analysis should therefore consider how often an event occurs, how close the system approaches a safety boundary, what consequences could result, and whether existing safety mechanisms respond correctly. This prevents large datasets from being interpreted only through simple occurrence counts.

Exposure information provides the denominator required to interpret operational events. Ten interventions observed over a short operating period have a different meaning from ten interventions observed across a very large fleet exposure. Exposure can be expressed using distance, operating hours, missions, intersections, obstacle encounters, pedestrian interactions, or another unit appropriate to the application. The selected measure should correspond to the safety question being evaluated and remain consistent across comparisons.

Data-driven validation also requires careful stratification of operational conditions. Aggregate fleet statistics can conceal weaknesses that occur only within specific environments. Data can therefore be partitioned according to weather, illumination, terrain, speed range, traffic density, sensor state, payload, geographic context, or ODD category. Comparing event rates and safety metrics across these partitions helps identify conditions in which system performance or safety intervention frequency differs from normal operation.

For outdoor AMRs, naturalistic data should reflect characteristics that are less prominent in conventional road vehicles. Terrain roughness, slope, wheel slip, curb interaction, vegetation, dust, rain, payload variation, worker proximity, temporary obstacles, GNSS quality, wireless communication, and restricted operating zones may all affect safety. Combining these environmental variables with vehicle and software states makes it possible to identify operational patterns associated with degraded autonomy or repeated safety interventions.

Naturalistic evidence should feed back into the scenario-based validation process. When field data reveals a new safety-relevant event, the event can be reconstructed as a reproducible scenario, parameterized around the observed conditions, and added to the regression library. Nearby variations can then be generated to explore whether the observed case represents an isolated event or a broader region of weakness. This creates a closed loop between fleet observation, scenario generation, testing, software improvement, and redeployment.

The same data can support comparison between software versions. Before deploying an updated perception, localization, planning, control, or safety function, historical operational data can be replayed to determine whether the new version changes decisions in safety-relevant situations. After deployment, fleet metrics can be compared with previous versions while accounting for differences in exposure and operating conditions. Unexpected changes can trigger investigation, additional simulation, or targeted field testing.

Data quality must itself be validated because corrupted or incomplete recordings can produce misleading safety conclusions. Missing sensor packets, clock drift, incorrect calibration, inconsistent software metadata, dropped messages, storage failures, or inaccurate event labels can distort reconstruction. Validation pipelines should therefore track data provenance, synchronization quality, recording completeness, configuration information, and processing versions so that every safety conclusion can be traced back to reliable source data.

Privacy, storage capacity, and computational cost also influence naturalistic-data architectures. Continuous raw recording from multiple high-bandwidth sensors can create extremely large datasets, making selective logging and event-triggered retention attractive. However, aggressive filtering can discard information needed to understand an unexpected event. A practical architecture may combine rolling buffers, trigger-based preservation, summarized fleet telemetry, selected raw sensor uploads, and centralized indexing for later investigation.

Naturalistic data does not automatically constitute proof of safety. The absence of observed failures may simply indicate insufficient exposure to rare hazardous conditions, and operational data is inherently biased toward situations that the deployed fleet has actually encountered. Evidence should therefore be interpreted together with scenario coverage, simulation, fault injection, safety requirements, and statistical confidence. Field observations strengthen safety arguments when their scope and limitations are explicitly understood.

A mature data-driven safety process converts fleet operation into continuous validation evidence. Operational data is collected, quality-checked, indexed, mined for safety-relevant events, normalized by exposure, stratified by operating conditions, and compared across system versions. Newly discovered cases return to the scenario library and regression pipeline, while recurring patterns guide engineering priorities. In this way, naturalistic data transforms real-world operation from passive logging into an active feedback mechanism for continuous safety improvement.

09.09. Safety Case Development GSN Argumentation

A safety case is a structured body of reasoning and evidence used to justify that an autonomous-driving system is acceptably safe for a defined application and operating context. It does not consist of a single test report or certification document. Instead, it connects safety objectives, identified hazards, architectural controls, verification activities, operational assumptions, and supporting evidence into an explicit argument explaining why the system's safety claims are considered adequately supported.

Goal Structuring Notation, commonly abbreviated as GSN, provides a graphical and logical framework for expressing this argument. Rather than presenting hundreds of requirements and test results as disconnected documents, GSN organizes them around claims that must be demonstrated. The argument is progressively decomposed from high-level safety goals into strategies, sub-goals, contextual assumptions, justifications, and evidence until each relevant claim is supported by information that can be reviewed and challenged.

The top-level goal should clearly define what is being claimed and under which conditions. A statement that an autonomous vehicle is simply "safe" is too broad to support meaningful assurance. The claim should identify the system, intended operation, relevant lifecycle state, and defined Operational Design Domain. For an outdoor AMR, this context can include terrain, maximum speed, payload, pedestrian interaction, weather limits, localization availability, communication assumptions, and restricted operating areas.

GSN arguments commonly use goals, strategies, contexts, assumptions, justifications, and solutions as distinct reasoning elements. A goal expresses a claim that requires support, while a strategy explains how that claim will be decomposed or argued. Context defines information necessary to interpret the claim, and assumptions identify conditions on which the reasoning depends. Justifications explain why a reasoning approach is appropriate, while solutions reference evidence such as analyses, test reports, inspection results, simulation records, or operational data.

A high-level autonomous-driving safety claim can be decomposed according to hazards, system functions, architectural layers, operating conditions, or lifecycle activities. One branch may argue that perception-related risks are adequately controlled, another may address localization, planning, and control, while additional branches address runtime supervision, fallback behavior, emergency intervention, and system degradation. The decomposition should follow the actual safety architecture so that the argument reflects how risk is controlled in the implemented system.

The safety mechanisms developed throughout the architecture become important components of the argument. Sensor redundancy can support claims concerning continued environmental awareness, while runtime safety monitors provide evidence for detecting invalid system behavior. Watchdogs and heartbeats support execution-integrity claims, fallback planning supports degraded-operation claims, and the safety cage supports intervention and command-control claims. These mechanisms become meaningful safety evidence only when their requirements, implementation, and verification can be traced consistently.

Evidence should be appropriate to the specific claim it supports. Unit and integration tests may demonstrate individual software requirements, while software-in-the-loop and hardware-in-the-loop testing can evaluate interactions and timing behavior. Scenario-based simulation can provide broad behavioral coverage, and controlled vehicle testing can verify physical responses. Naturalistic fleet data can add evidence about operation under real environmental variation. No single evidence source is normally sufficient for every level of the safety argument.

Traceability is fundamental because the reviewer must be able to move from a safety claim to the requirements and evidence that support it. A hazard identified during safety analysis can generate one or more safety requirements, which are allocated to architectural elements and verified through specific tests or analyses. The resulting evidence should then link back into the corresponding GSN claim. This chain allows missing requirements, unsupported claims, obsolete evidence, and untested assumptions to be identified systematically.

Scenario-based safety testing can become direct evidence within the safety case when scenarios are linked to specific claims and requirements. A claim that the system maintains safe obstacle clearance, for example, can reference tests spanning relevant speeds, obstacle configurations, environmental conditions, and degradation modes. Coverage information strengthens the argument by showing which parts of the defined scenario space have been examined and where limitations or remaining evidence gaps still exist.

Naturalistic operational data provides another evidence layer by showing whether assumptions made during development remain valid in field operation. Intervention rates, fallback events, sensor degradation, operator takeovers, near-boundary behavior, and newly discovered scenarios can be connected to relevant safety claims. Field evidence can also reveal that an assumption used in the original safety argument is incomplete, requiring the argument, requirements, scenario library, or operational restrictions to be revised.

Confidence in evidence depends not only on test results but also on the quality of the process that produced them. A successful test has limited assurance value if the tested software version is unknown, sensor configuration is undocumented, timestamps are unreliable, or acceptance criteria were defined after observing the result. Safety-case evidence should therefore preserve configuration, provenance, test conditions, expected outcomes, tool information, and review status so that its relevance and credibility can be independently assessed.

Assumptions require explicit management because hidden assumptions can weaken an otherwise convincing safety argument. The system may assume that GNSS accuracy remains within a defined range, that a safety controller is independently powered, that operators respond within a specified time, or that certain terrain is excluded from the ODD. These assumptions should appear in the argument and be verified or enforced where possible. If an assumption no longer holds, dependent claims may need to be reconsidered rather than silently remaining valid.

Incomplete arguments and evidence gaps should be visible rather than concealed. During development, some goals may remain unsupported because testing is unfinished, a subsystem has changed, or sufficient operational exposure has not yet been accumulated. GSN can explicitly expose these open areas and connect them to planned verification activities. This makes the safety case useful as an engineering management tool during development rather than treating it only as documentation produced after the system is complete.

Change management is particularly important for autonomous software because perception models, planning algorithms, maps, sensor configurations, and safety thresholds may evolve frequently. A software update should trigger an impact analysis identifying which requirements, hazards, GSN claims, assumptions, and evidence are affected. Regression tests and updated validation results can then replace or supplement obsolete evidence. Maintaining these relationships prevents the safety case from becoming disconnected from the actual deployed system.

For outdoor AMRs, the safety argument should connect software behavior with the physical machine and its operating environment. Claims concerning safe stopping, obstacle avoidance, slope operation, traction, payload, actuator faults, emergency stopping, and human interaction require evidence that includes physical platform characteristics. Software assurance alone cannot demonstrate these properties. The argument therefore needs to integrate autonomous software evidence with vehicle-level testing, hardware safety mechanisms, operational procedures, and ODD restrictions.

A mature safety case is therefore a living assurance structure rather than a static collection of documents. High-level safety goals are decomposed into reviewable claims, connected to explicit assumptions and contexts, and supported by traceable evidence from analysis, simulation, scenario testing, HIL, vehicle testing, and naturalistic operation. As the system changes and new evidence becomes available, the GSN argument evolves with it, maintaining a visible chain from hazards and safety requirements to implemented controls and demonstrated safety behavior.

09.10. Outdoor AMR Safety Certification ISO 13849 Case

An outdoor Autonomous Mobile Robot requires a safety architecture that connects autonomous software behavior with machinery-level functional safety. ISO 13849 provides a framework for designing and evaluating safety-related parts of control systems, while the autonomous stack provides perception, localization, planning, and motion control. Certification-oriented engineering therefore requires a clear boundary between normal autonomy functions and safety-related control functions that must achieve defined risk-reduction performance.

The process begins with defining the machine, its intended use, reasonably foreseeable misuse, operating environment, and system boundaries. For an outdoor AMR, relevant conditions can include pedestrian interaction, mixed traffic, uneven terrain, slopes, restricted zones, payload variation, weather, limited visibility, GNSS degradation, communication loss, and maintenance activity. These conditions establish the context in which hazards are identified and safety functions are derived.

Risk assessment converts identified hazards into explicit risk-reduction requirements. Typical hazards include collision with people or objects, unintended motion, excessive speed, loss of steering or braking, unexpected startup, instability on slopes, actuator faults, and failure of emergency stopping. Each hazard should be associated with hazardous situations, possible consequences, exposure conditions, avoidance possibilities, and protective measures rather than being treated as an isolated component failure.

A safety function defines the control-system behavior required to reduce a particular risk. Examples for an outdoor AMR can include emergency stopping, protective stopping, safe speed limitation, prevention of unexpected startup, motion inhibition when a safety condition is invalid, and controlled response to detected faults. Each function should specify its trigger, required response, safe state, response time, interfaces, reset behavior, and conditions for returning to normal operation.

ISO 13849-1 uses Performance Level as a central concept for expressing the ability of safety-related control functions to perform under foreseeable conditions. Required Performance Level is determined from risk considerations, after which the implemented safety-related parts of the control system are designed to achieve the required capability. The assessment therefore concerns the complete safety function and its input, logic, and output path rather than simply assigning a safety designation to an individual sensor or controller.

Architecture is important because fault tolerance depends partly on how safety-related components are organized. A safety function may include safety sensors or emergency-stop devices as inputs, safety logic implemented in an appropriate controller, and contactors, safe torque off interfaces, brakes, or motor-control mechanisms as outputs. Diagnostic mechanisms and redundancy can be introduced where required so that relevant faults are detected and do not silently eliminate the intended protective function.

Quantitative reliability information also contributes to the achieved Performance Level. Component reliability, diagnostic coverage, architectural structure, and measures against common-cause failures must be considered together. Redundant channels provide limited benefit if both channels can fail because of the same power source, environmental disturbance, wiring damage, software dependency, or communication failure. Independence and common-cause considerations therefore need to be addressed explicitly in the safety design.

The autonomous-driving software should not automatically be assumed to be a safety-rated implementation merely because it contributes to safe behavior. AI perception, localization, planning, and complex software can support operational safety while a separate safety-related control path enforces critical protective functions. For example, the autonomy stack may generate the desired trajectory, while an independently designed safety layer can restrict motion or initiate stopping when defined safety conditions are violated.

This separation can be implemented through a safety cage that supervises the commands produced by the autonomy stack. Vehicle speed, obstacle proximity, safety-zone status, actuator state, communication health, and other selected signals can be evaluated before motion authority is maintained. If the autonomous command violates a defined safety constraint, the system can limit authority, request a controlled stop, or activate a more independent protective mechanism according to the required safety response.

Emergency stopping requires particular attention because stopping behavior depends on the complete physical vehicle. Detection latency, controller response, communication delay, drive response, brake behavior, vehicle speed, mass, payload, slope, traction, and surface condition all influence stopping distance. An outdoor AMR should therefore be validated using representative physical conditions rather than relying solely on software timing calculations or nominal actuator specifications.

Safe speed and protective separation are similarly coupled to vehicle dynamics and sensing capability. A speed that is acceptable on level pavement may not provide equivalent stopping performance on a wet slope, loose surface, or heavily loaded platform. Safety-related speed limits may therefore depend on operating mode and validated physical constraints. The safety architecture should ensure that autonomous planning cannot command motion outside the envelope established for the applicable operating condition.

Fault reaction is another essential part of the certification case. The system should define what happens when a safety sensor fails, communication is interrupted, a controller detects an internal fault, an actuator does not respond as commanded, or redundant channels disagree. Depending on the safety function, the required reaction may include motion inhibition, controlled deceleration, protective stop, emergency stop, or prevention of restart until the fault has been acknowledged and corrected.

Reset and restart logic must prevent a stopped robot from unexpectedly resuming motion. Clearing an emergency-stop input or restoring communication should not by itself authorize autonomous movement. The system should verify the relevant safety conditions, establish that the protective function is available, confirm the required operating state, and then follow a defined restart procedure. Where human acknowledgement is required, the reset action should not itself initiate hazardous motion.

Validation must demonstrate that each safety function satisfies its specified requirements under relevant normal and fault conditions. Testing should include input activation, logic processing, output response, timing, diagnostic behavior, fault injection, restart behavior, and representative environmental or operating conditions. Hardware-in-the-loop testing can support development, but physical vehicle testing remains important when braking, traction, payload, terrain, or actuator dynamics influence the safety function.

Documentation should maintain traceability from hazard analysis through risk assessment, required safety functions, Performance Level requirements, architecture, component data, calculations, verification, validation, and final evidence. Configuration information is equally important because a change in sensor type, controller firmware, drive interface, brake hardware, software logic, or wiring can affect the safety-related function. Certification evidence must therefore correspond to the actual configuration being assessed.

For an outdoor AMR, ISO 13849 should be treated as one part of a broader safety engineering framework rather than as a complete certification solution for autonomous behavior. Functional safety of safety-related control functions must be integrated with mechanical safety, electrical design, autonomous-software validation, cybersecurity considerations, operating procedures, ODD restrictions, and applicable machine requirements. The exact set of standards and conformity activities depends on the machine, intended market, application, and regulatory context.

The resulting certification case connects physical hazards to implemented risk controls through traceable engineering evidence. Autonomous intelligence can remain responsible for sophisticated perception and navigation, while defined safety-related control functions provide independently justified protection against critical hazardous motion. By combining risk assessment, safety-function specification, Performance Level engineering, fault-tolerant architecture, physical validation, configuration control, and safety-case evidence, an outdoor AMR can be developed toward a defensible and auditable machinery-safety argument.


Author: Richard Minsoo Go

LinkedIn: Richard Minsoo Go

Top comments (0)