Autonomous Systems
Build autonomous systems: robotics, computer vision, sensor fusion, and safety-critical AI systems.
What is an autonomous system?
An autonomous system repeatedly senses an environment, estimates what is happening, chooses a plan, and controls a physical or digital process with limited moment-to-moment human direction. A warehouse robot, inspection drone, and automated vehicle have different mechanics, but they share one defining property: their actions change the environment that produces the next observation.
That feedback loop makes autonomy different from a prediction API. A missed detection can change a trajectory; the trajectory changes position; the new position changes what the sensors can see. Small errors can therefore compound unless the architecture keeps uncertainty, timing, and authority explicit.
The core invariant is a learned component must not be the only barrier between uncertain evidence and an unsafe action. Production systems need deterministic limits, health and timing monitors, bounded control authority, a reachable safe state, and evidence that these defenses work together.
This lesson teaches architecture and evaluation principles, not a deployable safety case. Applicable standards, hazards, operating limits, and certification obligations depend on the product and jurisdiction and require qualified domain engineers.
1 Sense
Observe the environment
Collect timestamped measurements and health signals from cameras, lidar, radar, inertial units, encoders, maps, application events, or other domain sensors.
2 Estimate
Infer a belief state
Fuse current and prior evidence into position, motion, objects, free space, intent, and uncertainty rather than treating one model output as ground truth.
3 Plan
Select a bounded action
Generate feasible trajectories or decisions, reject candidates that violate constraints, and expose the assumptions behind the chosen plan.
4 Control
Act, measure, and correct
Track the bounded command, compare expected and measured response, revoke authority when limits fail, and begin the next loop from fresh evidence.
Define the autonomy contract before choosing models
The system is not "autonomous everywhere." It is autonomous only inside a documented operational design domain: the conditions, locations, speeds, sensor health, connectivity, task types, and human support assumptions under which its safety and performance claims apply.
Where it may act
Operating domain
Name environmental ranges, map coverage, lighting, weather, traffic, surface conditions, payload, speed, communication, and supervision assumptions.
What it may command
Authority boundary
Limit speed, acceleration, force, route, resource use, and control duration. A planner proposes; a separate gate decides whether the command is allowed.
How it contains risk
Safe state
Define a state the system can actually reach after a fault: hold position, controlled landing, limited motion, service isolation, or human handoff.
How claims are justified
Evidence contract
Connect each safety and performance claim to scenario coverage, fault injection, hardware timing, replay, field monitoring, and an accountable owner.
Write these boundaries as testable statements
- Entry condition: all required sensors, calibration, maps, compute deadlines, actuators, and fallback paths are healthy.
- Continued-operation condition: uncertainty, command age, control error, and environmental conditions stay inside explicit limits.
- Exit trigger: any violated health, timing, confidence, or physical constraint revokes some or all primary authority.
- Fallback guarantee: the fallback can detect, take control, and reach its safe state before the modeled hazard window closes.
- Human role: the system states whether a person supervises, authorizes, remotely assists, or only responds after a safe stop.
An operating-domain limit is an architectural control, not product copy. It must be observable at runtime and connected to a tested response when the system approaches or leaves the domain.
A safety-bounded autonomy architecture
The primary decision path and the runtime assurance path meet at the authority gate. The monitor observes health, timing, uncertainty, and command constraints without depending only on the primary model's conclusion.
Evidence
Sensors and time base
Synchronize measurements, calibration, freshness, and sensor health. Preserve raw evidence needed for replay.
Belief
Perception and state
Detect task-relevant entities, track motion, localize the platform, fuse disagreement, and carry uncertainty forward.
Candidates
Prediction and planning
Forecast relevant motion, generate feasible actions, and score progress, comfort, risk, and constraint margins.
Boundary
Authority gate
Reject stale, uncertain, physically infeasible, or out-of-domain commands before they reach the actuator interface.
Action
Controller and plant
Track bounded references, enforce actuator limits, measure the physical response, and expose tracking error.
Independent path
Runtime assurance
Monitor the full loop, revoke primary authority, select a fallback, and record why the transition occurred.
Trace uncertainty from perception to control authority
Perception does not produce truth; it produces evidence. State estimation combines that evidence with prior state and motion models, while planning turns the resulting belief into a candidate action. The controller should receive both the command and the envelope that makes it valid.
Use the workbench to change the scenario, sensor reliability, evidence path, and planning posture. It recomputes effective confidence, state uncertainty, stopping distance, clearance, and the amount of authority granted for the next control interval.
The executable example implements the same decision contract without a robotics framework. Its result is inspectable and deterministic, making it suitable for unit tests and incident reconstruction.
Keep perception and state estimation separate
Perception extracts task-relevant evidence from measurements. State estimation combines evidence over time into a belief about the system and environment. Keeping the contracts separate makes missing data, disagreement, age, and uncertainty visible to the planner.
What may be present
Detection and classification
Identify objects, free space, landmarks, anomalies, or events. Report calibrated scores, timestamps, sensor origin, and the conditions under which the detector was evaluated.
How it may change
Tracking and motion
Associate observations across time and estimate velocity, acceleration, intent, and uncertainty. A track must survive short occlusion without inventing certainty.
Where the system is
Localization and mapping
Estimate pose relative to a map or local frame. Carry covariance and map validity so planning can widen margins or stop when pose becomes ambiguous.
What evidence agrees
Sensor fusion
Align time and coordinates before combining modalities. Preserve disagreement as a fault signal; averaging incompatible evidence can hide the exact condition that requires fallback.
Design the state contract for downstream decisions
- Include timestamps and maximum acceptable age for every task-relevant field.
- Separate unknown, not observed, and observed absent; they imply different actions.
- Carry covariance, confidence intervals, ensemble disagreement, or another calibrated uncertainty representation.
- Record the sensor and model versions that contributed to each state estimate.
- Expose degraded modes explicitly instead of silently filling missing evidence with defaults.
- Evaluate by operating regime and decision consequence, not only aggregate detection accuracy.
For foundations on drift and feedback, review continual learning and human-in-the-loop ML.
Separate prediction, planning, and control
A prediction model estimates how agents or the environment may evolve. A planner compares candidate actions under those predictions. A controller tracks the selected reference against real physical response. Combining all three behind one opaque output makes it difficult to enforce constraints or identify which assumption failed.
State + uncertainty
Planner input
The plan must know what is believed, how old it is, and where evidence is weak
Trajectory + envelope
Planner output
Return a time-indexed action plus speed, force, clearance, and validity limits
Command + feedback
Control loop
Track the reference while measuring actuator saturation, lag, and physical error
One bounded interval
Authority
Execute briefly, then reobserve and replan instead of trusting a stale open-loop sequence
Budget distance and time end to end
For straight-line braking, a useful first estimate is:
required distance = reaction distance + braking distance + clearance + state uncertainty
where reaction distance = speed x end-to-end delay and idealized braking distance = speed^2 / (2 x deceleration). Production models must also account for actuator dynamics, slope, surface, payload, controller error, and uncertainty in the obstacle prediction.
- Generate feasible candidates: obey geometry, dynamics, route, resource, and policy constraints before scoring comfort or progress.
- Evaluate uncertainty: penalize candidates whose safety depends on poorly observed state or predictions beyond a credible horizon.
- Apply hard boundaries: reject commands that exceed speed, force, acceleration, clearance, freshness, or operating-domain limits.
- Track measured response: compare the commanded and realized state so actuator lag or control instability becomes a runtime fault.
- Replan from evidence: execute the smallest useful action and correct from the next synchronized observation.
Make the fallback faster and simpler than the hazard
A fallback is not useful merely because it exists in a diagram. The system must detect the violation, revoke primary authority, transfer control, and reach a safe state before the hazard becomes unavoidable. It must also avoid the same dependencies and assumptions that caused the primary path to fail.
Use the control room to inject a sensor, localization, actuator, or compute fault. Change detection latency, monitor independence, fallback behavior, and evaluation evidence; the timing race and release gates update together.
The code example keeps timing, residual risk, and evidence coverage as separate gates. A fast fallback cannot compensate for missing evaluation coverage, and a strong test plan cannot compensate for a response that arrives too late.
Reduce common-cause failure
- Use a simpler monitor whose logic can be reviewed and tested independently from the primary learned stack.
- Observe sensor health, time freshness, uncertainty, command limits, actuator response, and operating-domain membership.
- Keep the fallback's compute, power, communication, state, and actuator assumptions explicit.
- Test handover under partial failure; a healthy fallback that cannot gain authority is not a fallback.
- Make remote assistance bounded: advice must not bypass onboard safety constraints or become an unmodeled control path.
Build evidence as a ladder, not one benchmark
Simulation makes rare, dangerous, and combinatorial scenarios repeatable, but a simulator is another model with its own gaps. Use several evidence sources whose weaknesses differ, and trace each result to the safety or performance claim it supports.
1 Unit and replay
Test components against contracts
Check perception calibration, state update invariants, planner feasibility, command limits, and monitor logic with deterministic fixtures and protected incident traces.
2 Simulation
Explore scenario boundaries
Vary geometry, agents, weather, lighting, sensor noise, timing, maps, and policy while measuring both expected behavior and fallback transitions.
3 Hardware in loop
Preserve physical timing
Run production compute, buses, sensors, controllers, and actuators so queueing, synchronization, saturation, and transfer latency remain visible.
4 Monitored operation
Expand the domain gradually
Start inside a narrow envelope, compare field traces with predictions, maintain rollback and stop authority, and widen only when evidence supports the new claim.
Evaluate the complete closed loop
- Perception: calibration, missed and false evidence, age, regime coverage, and uncertainty under corruption or sensor loss.
- State estimation: pose and track error over time, covariance calibration, recovery after disagreement, and behavior during missing observations.
- Planning: feasibility, clearance, rule compliance, progress, stability, and sensitivity to plausible state or prediction errors.
- Control: tracking error, overshoot, saturation, actuator latency, disturbance rejection, and safe transfer of authority.
- Runtime assurance: detection coverage, false intervention rate, response-time distribution, common-cause exposure, and safe-state completion.
- System outcome: scenario-level success, near misses, harmful events, human workload, recovery, and behavior at operating-domain boundaries.
Do not tune against every protected edge-case suite. Keep holdouts, independent review, and post-release monitors so the evaluation remains evidence rather than another training signal.
Operate every decision as a reconstructable trace
An autonomy incident often appears at the actuator but begins earlier: an old sensor frame, a calibration change, a state-estimation jump, a planner assumption, a missed runtime signal, or delayed control transfer. Telemetry must preserve causal order across the full loop.
Reconstruct
Decision trace
Store synchronized evidence references, state and uncertainty, candidate and selected plans, gate decisions, commands, measured response, and relevant versions.
Detect
Boundary health
Monitor operating-domain membership, freshness, deadline misses, calibration, disagreement, uncertainty, actuator tracking, fallback readiness, and human support health.
Respond
Fleet containment
Support command rejection, capability reduction, route or domain restriction, safe stop, rollback, and configuration quarantine without waiting for a model retrain.
Recover
Evidence refresh
Turn incidents into protected scenarios, repair the responsible contract, revalidate affected claims, and restore capability gradually under monitoring.
Run the incident loop in a fixed order
- Contain: revoke unsafe authority and move affected systems toward the defined safe state.
- Preserve: freeze synchronized traces, software and model versions, maps, calibration, configuration, and operator actions.
- Localize: determine whether the first invalid assumption occurred in sensing, estimation, prediction, planning, monitoring, control, or operations.
- Repair: change the narrowest responsible contract, dataset, component, monitor, or operating-domain boundary.
- Requalify: replay the incident class, neighboring scenarios, transfer timing, and regression suite before restoring capability.
Avoid recurring production failures
- Aggregate accuracy hides dangerous regimes: average metrics conceal rare conditions where uncertainty and harm are highest.
- Freshness is treated as metadata: a correct but stale state can produce a physically unsafe command.
- Fallback shares the failed dependency: the backup cannot take control because it uses the same sensor, compute, power, or state estimate.
- Simulation success becomes a universal claim: model gaps are ignored when transferring to hardware or a wider operating domain.
- Remote help becomes hidden control: human guidance bypasses the onboard authority gate or lacks a tested timeout path.
- Logs cannot reconstruct causality: unsynchronized telemetry prevents engineers from locating the first invalid assumption.
Primary references and standards context
- NIST AI Risk Management Framework 1.0 defines a lifecycle for mapping, measuring, managing, and governing AI risk, including testing, uncertainty, monitoring, and safe failure.
- ISO 26262 road-vehicle functional safety addresses hazards caused by malfunctioning behavior of safety-related electrical and electronic systems across the lifecycle.
- ISO 21448:2022 addresses safety of the intended functionality, including hazards from specification or performance insufficiencies where situational awareness depends on complex sensors and processing.
- A Verification Framework for Runtime Assurance of Autonomous UAS presents NASA research on verifying runtime-assurance architectures for autonomous aircraft systems.
- CARLA: An Open Urban Driving Simulator describes an open simulator designed for autonomous-driving research and controlled scenario evaluation.
- Waymo's Safety Methodologies and Safety Readiness Determinations documents one operator's layered approach across hardware, autonomous-driving behavior, operations, and governance.
- A New Approach to Linear Filtering and Prediction Problems introduces the recursive state-estimation method now known as the Kalman filter.
Standards are application-specific and evolve. Treat these sources as starting points for qualified safety and compliance work, not as a universal certification checklist.