Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

HARA: Hazard Analysis and Risk Assessment

HARA Methodology (ISO 26262 Part 3)
  Step 1: Hazard Identification
  Function → Malfunction → Hazardous Situation
  e.g., Electronic Power Steering → Unintended torque application → Vehicle swerves

  Step 2: Severity (S) Classification
  S0: No injury | S1: Light injury | S2: Serious injury | S3: Life-threatening/fatal

  Step 3: Exposure (E) Classification
  E0: Implausible | E1: Very rare | E2: Rare | E3: Occasional | E4: High probability

  Step 4: Controllability (C) Classification
  C0: Controllable | C1: Simply controllable | C2: Normally controllable
  C3: Difficult to control / uncontrollable

  ASIL Lookup Matrix (ISO 26262-3 Table 4):
        C1    C2    C3
  S1E1  QM    QM    QM
  S2E2  QM    QM    A
  S2E3  QM    A     B
  S3E3  A     B     C
  S3E4  B     C     D

  Output: Safety Goal with ASIL
  e.g., S3, E3, C2 → ASIL C
  Safety Goal: "EPS shall not apply unintended torque > 3 Nm for > 500 ms" 
Pythonhara_asil_calculator.py
#!/usr/bin/env python3
# HARA ASIL determination per ISO 26262 Part 3 Table 4

ASIL_TABLE = {
    # (S, E, C): ASIL
    (1,1,1): "QM", (1,1,2): "QM", (1,1,3): "QM",
    (1,2,1): "QM", (1,2,2): "QM", (1,2,3): "QM",
    (1,3,1): "QM", (1,3,2): "QM", (1,3,3): "A",
    (1,4,1): "QM", (1,4,2): "QM", (1,4,3): "A",
    (2,1,1): "QM", (2,1,2): "QM", (2,1,3): "QM",
    (2,2,1): "QM", (2,2,2): "QM", (2,2,3): "A",
    (2,3,1): "QM", (2,3,2): "A",  (2,3,3): "B",
    (2,4,1): "QM", (2,4,2): "A",  (2,4,3): "B",
    (3,1,1): "QM", (3,1,2): "QM", (3,1,3): "A",
    (3,2,1): "QM", (3,2,2): "A",  (3,2,3): "B",
    (3,3,1): "A",  (3,3,2): "B",  (3,3,3): "C",
    (3,4,1): "B",  (3,4,2): "C",  (3,4,3): "D",
}

def determine_asil(severity, exposure, controllability, hazard_name=""):
    key = (severity, exposure, controllability)
    asil = ASIL_TABLE.get(key, "Invalid")
    print(f"  {hazard_name or 'Hazard'}: S{severity}, E{exposure}, C{controllability} → ASIL {asil}")
    return asil

# EPS HARA example
print("HARA Results — Electronic Power Steering:")
determine_asil(3, 3, 2, "Unintended torque > 3Nm at highway speed")  # → ASIL C
determine_asil(3, 3, 1, "Loss of steering assist at low speed")        # → ASIL B
determine_asil(2, 2, 2, "Torque oscillation < 1Nm at parking speed")   # → QM

ASIL Decomposition

Original ASILDecomposition ResultIndependence Requirement
ASIL DASIL D(D)Single ASIL D channel — no decomposition
ASIL DASIL B(D) + ASIL B(D)Two independent ASIL B channels; independence proven (no shared HW/SW)
ASIL CASIL A(C) + ASIL B(C)Two independent channels; ASIL A + ASIL B combined
ASIL BASIL A(B) + ASIL A(B)Two independent ASIL A channels

⚠️ Independence Must Be Real

ASIL decomposition is only valid if the two channels are genuinely independent — no shared hardware, no shared compiler, no shared software module, and no common cause failure. Common failures auditors look for: both channels compiled with the same MISRA-violating compiler option; shared MCU clock that could fail both channels simultaneously; AUTOSAR OS running both channels in the same partition without memory protection. Any shared element must be covered by a separate safety mechanism or the decomposition claim is invalid.

ISO 26262 Part 6 Key Work Products

Work ProductASIL AASIL BASIL CASIL D
Software Safety Requirements SpecRequiredRequiredRequiredRequired
SW Architecture DesignRequiredRequiredRequiredRequired
SW Detailed DesignRequiredRequiredRequiredRequired
MISRA C complianceRecommendedRecommendedRequiredRequired
Code reviewRequiredRequiredRequiredRequired
Unit tests — Statement coverageRequiredRequired
Unit tests — Branch coverageRequiredRequiredRequired
Unit tests — MC/DC coverageRequiredRequired
SW FMEARecommendedRequiredRequiredRequired
FTA (Fault Tree Analysis)RecommendedRequiredRequired
SW Verification ReportRequiredRequiredRequiredRequired

Functional Safety Assessment

Pythonfsa_finding_tracker.py
#!/usr/bin/env python3
# FSA finding tracker: manage findings from independent safety assessor
import json
from datetime import date

findings = [
    {
        "id": "FSA-001",
        "type": "Confirmed Finding",  # blocks Safety Case closure
        "clause": "ISO26262-6:11.4.3",
        "description": "MC/DC coverage report missing for SW component EPS_Control_v2.1",
        "severity": "Major",
        "owner": "Test Engineer",
        "due_date": "2026-03-01",
        "status": "Open",
        "resolution": None
    },
    {
        "id": "FSA-002",
        "type": "Observation",
        "clause": "ISO26262-6:8.4.5",
        "description": "Freedom from Interference argument does not cover DMA transfer paths",
        "severity": "Minor",
        "owner": "SW Architect",
        "due_date": "2026-03-15",
        "status": "In Progress",
        "resolution": "Updated FFI analysis v3 in review"
    },
]

print("FSA Findings Status:")
for f in findings:
    days_remaining = (date.fromisoformat(f["due_date"]) - date.today()).days
    print(f"  [{f['id']}] {f['type']} ({f['severity']}) — {f['clause']}")
    print(f"    Status: {f['status']} | Due: {f['due_date']} ({days_remaining}d remaining)")
    print(f"    Owner: {f['owner']}")
    if f["resolution"]: print(f"    Resolution: {f['resolution']}")
    print()

major_open = [f for f in findings if f["severity"]=="Major" and f["status"]!="Closed"]
print(f"SAFETY CASE BLOCKED: {len(major_open)} Major finding(s) open.")
print("All Major findings must be Closed before Safety Case can be signed off.")

Summary

ISO 26262 compliance follows a structured path: HARA produces ASIL-rated Safety Goals; safety goals drive safety requirements through each level of the V-model; work products (FMEA, test coverage, code review) provide evidence of requirement fulfilment; and the FSA independently verifies the complete evidence set. MC/DC coverage for ASIL C/D and MISRA C compliance are the two requirements most commonly flagged as findings in FSAs — start these early in the project, not at integration testing.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

← PreviousHands-On: Compliance Matrix CreationNext →ISO 21448 (SOTIF) Integration