Skip to content

crashmetrics.virtual_testing

virtual_testing

Euro NCAP frontal sled and virtual testing (VTC), 2026 protocols.

Implements the frontal part of

  • Euro NCAP Crash Protection Virtual Testing Protocol v1.0.2 (December 2025): model quality criteria (Section 5.2), the ISO/TS 18571 sensor score (5.3.1), the assessment criteria deviation (5.3.2) and the acceptance criteria (5.4), and
  • Euro NCAP Crash Protection Frontal Impact Protocol v1.2: the load case matrix (Section 3.3.1), the sled and virtual testing score (10 points: driver and front passenger, 2.5 sled and 2.5 virtual each) and its rules (no HBM data: virtual score halved; validation not met: sled load cases only).

Workflow:

  1. The vehicle manufacturer simulates the load cases of FRONTAL_LOAD_CASES (Hybrid III 5th, 50th and 95th, 35, 50 and 56 km/h, plus a 50th percentile human body model driver).
  2. Two load cases are run as physical sled tests. For each, the simulation is validated: model quality (check_model_quality), ISO/TS 18571 sensor scores above 0.5 (sensor_score) and assessment criteria within 30 % (kpi_checks), combined by validate_load_case.
  3. score_sled_virtual scores one occupant from the two sled tests and the three virtual-only load cases.

Interpretations where the protocols are not explicit are listed in the protocol notes (search "virtual testing").

FRONTAL_LOAD_CASES module-attribute

FRONTAL_LOAD_CASES: dict[int, LoadCase] = {
    1: LoadCase(
        1,
        50,
        "UN R137 pulse (VM)",
        "hybrid3_50",
        "hybrid3_95",
    ),
    2: LoadCase(
        2,
        56,
        "56 km/h rigid wall pulse (VM)",
        "hybrid3_95",
        "hybrid3_05",
    ),
    3: LoadCase(
        3,
        35,
        "Euro NCAP FWDB pulse",
        "hybrid3_50",
        "hybrid3_05",
    ),
    4: LoadCase(
        4,
        35,
        "Euro NCAP FWDB pulse",
        "hybrid3_05",
        "hybrid3_50",
    ),
    5: LoadCase(
        5,
        56,
        "56 km/h rigid wall pulse (VM)",
        "hybrid3_05",
        "hybrid3_95",
    ),
    6: LoadCase(
        6, 50, "UN R137 pulse (VM)", "hbm_50", None
    ),
}

Frontal Impact Protocol v1.2, Section 3.3.1 (columns numbered here from left to right). Load cases 1-5 are Hybrid III load cases (two of them sled tested); 6 is the human body model driver.

QUALITY_LIMITS module-attribute

QUALITY_LIMITS: dict[str, float] = {
    "hourglass_ratio": 0.1,
    "added_mass_ratio": 0.05,
    "added_mass_ratio_separate": 0.025,
    "hpoint_dz_mm": 10.0,
    "hpoint_window_ms": 5.0,
    "sled_x_score": 0.95,
    "end_time_margin": 0.4,
}

Virtual Testing Protocol Section 5.2 and definitions: hourglass energy below 10 % of the maximum internal energy (whole set-up and each dummy), added mass below 5 % of the model mass (2.5 % for separate driver and passenger models), H-point z displacement below 10 mm in the first 5 ms, sled x acceleration ISO score above 0.95 (separate models), end time = time of maximum head x excursion + 40 %.

SENSOR_SCORE_MIN module-attribute

SENSOR_SCORE_MIN = 0.5

Acceptance: sensor ISO score must exceed 0.5 (Section 5.4.1).

KPI_DEVIATION_MAX module-attribute

KPI_DEVIATION_MAX = 0.3

Acceptance: dAC below 30 % for each assessment criterion (5.4.2).

KPI_MIN_TEST_RATIO module-attribute

KPI_MIN_TEST_RATIO = 0.5

dAC is calculated where AC_test / AC_limit >= 50 % (5.3.2).

FRONTAL_SENSORS module-attribute

FRONTAL_SENSORS: dict[str, tuple[str, ...]] = {
    "head": ("x", "y", "z"),
    "chest_acceleration": ("x", "y", "z"),
    "chest_deflection": ("x",),
    "pelvis": ("x", "y", "z"),
    "sled": ("x",),
    "shoulder_belt": ("force",),
}

Sensors whose ISO score decides acceptance (Section 5.4.1): head CoG, chest and pelvis accelerations, chest deflection x, sled x acceleration and shoulder belt (B3) force. Others are monitored only.

VIRTUAL_NOT_APPLICABLE module-attribute

VIRTUAL_NOT_APPLICABLE = (
    "knee_displacement",
    "tibia_index",
    "tibia_force",
)

Criteria not applicable to virtual tests (Frontal Impact Protocol Sections 3.5.3 and 3.5.4).

SLED_REGION_POINTS module-attribute

SLED_REGION_POINTS = 0.625 / 2

Points per body region per sled load case (two sled load cases).

VIRTUAL_REGION_POINTS module-attribute

VIRTUAL_REGION_POINTS = 0.625 / 3

Points per body region per virtual load case (three virtual load cases).

SLED_VIRTUAL_MAX module-attribute

SLED_VIRTUAL_MAX = 10.0

Sled and virtual testing: driver 5 + front passenger 5 points.

LoadCase dataclass

LoadCase(
    number: int,
    speed: int,
    pulse: str,
    driver: str,
    front_passenger: str | None,
)

One column of the frontal sled and virtual load case matrix.

speed instance-attribute

speed: int

Severity, km/h.

driver instance-attribute

driver: str

Dummy key (crashmetrics.frontal_scoring.DUMMY_LIMITS) or "hbm_50" for the human body model.

Check dataclass

Check(
    name: str,
    value: float | None,
    limit: float,
    rule: str,
    section: str,
    note: str = "",
)

One acceptance criterion.

value instance-attribute

value: float | None

None if not assessed.

rule instance-attribute

rule: str

"<" (value must be below the limit) or ">" (above).

section instance-attribute

section: str

Protocol section.

passed property

passed: bool | None

True or False; None if not assessed.

CheckResult dataclass

CheckResult(
    title: str,
    checks: dict[str, Check],
    notes: tuple[str, ...] = (),
)

A set of acceptance criteria (model quality or load case validation).

passed property

passed: bool

True if every assessed check passed (see also complete).

complete property

complete: bool

True if every check was assessed.

summary

summary() -> str

A text table, one line per check.

SensorScore dataclass

SensorScore(
    sensor: str,
    score: float,
    axis_scores: dict[str, float],
    weights: dict[str, float],
)

ISO/TS 18571 score of one sensor (Virtual Testing Protocol 5.3.1).

score instance-attribute

score: float

Weighted sensor score S = sum(w_i S_i).

KpiResult dataclass

KpiResult(
    criterion: str,
    test: float,
    simulation: float,
    limit: float,
    r_test: float,
    r_simulation: float,
    deviation: float | None,
)

Assessment criterion of test and simulation (Section 5.3.2).

limit instance-attribute

limit: float

AC limit: the lower performance limit of the Frontal Impact Protocol.

deviation instance-attribute

deviation: float | None

dAC = |r_test - r_simulation|; None where r_test < 50 %.

passed property

passed: bool | None

dAC < 30 %; None if not assessed.

SledVirtualScore dataclass

SledVirtualScore(
    position: str,
    points: float,
    max_points: float,
    sled_points: float,
    virtual_points: float,
    virtual_raw_points: float,
    sled: dict[int, DummyScore],
    virtual: dict[int, DummyScore],
    lower_leg_virtual_points: float,
    validated: bool,
    hbm_provided: bool,
    notes: tuple[str, ...] = (),
)

Sled and virtual testing score of one occupant (5 points).

virtual_points instance-attribute

virtual_points: float

After the HBM halving and the validation rule.

virtual_raw_points instance-attribute

virtual_raw_points: float

Virtual points before those rules.

lower_leg_virtual_points instance-attribute

lower_leg_virtual_points: float

Default virtual lower leg points (0 if a tibia LPL was exceeded).

summary

summary() -> str

Text summary with points per load case.

check_model_quality

check_model_quality(
    hourglass_ratio: float | None,
    added_mass_ratio: float | None,
    hpoint_dz_mm: float | None,
    dummy_hourglass_ratios: Mapping[str, float]
    | None = None,
    separate_models: bool = False,
    sled_x_score: float | None = None,
) -> CheckResult

Check the simulation quality criteria (Virtual Testing Protocol 5.2).

Parameters:

Name Type Description Default
hourglass_ratio float | None

Maximum hourglass energy / maximum internal energy of the whole set-up (e.g. 0.03 for 3 %).

required
added_mass_ratio float | None

Added mass from mass scaling / total model mass.

required
hpoint_dz_mm float | None

Largest H-point z displacement in the first 5 ms after t0, mm.

required
dummy_hourglass_ratios Mapping[str, float] | None

The same ratio for each dummy, e.g. {"driver": 0.04}.

None
separate_models bool

True if driver and passenger are separate models (added mass limit 2.5 %, sled x acceleration score required).

False
sled_x_score float | None

ISO score of the sled x acceleration (separate models).

None
Notes

Values left None are reported as not assessed.

model_quality_inputs

model_quality_inputs(
    glstat: GlobalEnergies,
    matsum: PartEnergies | None = None,
    dummy_parts: Mapping[str, Sequence[int]] | None = None,
) -> dict[str, object]

Hourglass and added mass ratios from LS-DYNA energy output.

Returns keyword arguments for check_model_quality: hourglass_ratio (from glstat), added_mass_ratio (peak percentage increase of glstat / 100) and, with matsum and dummy_parts (dummy name -> part IDs), dummy_hourglass_ratios.

frontal_end_time

frontal_end_time(
    time: ArrayLike,
    head_x_displacement: ArrayLike,
    t0: float = 0.0,
) -> float

End time of the frontal data: the time of maximum head x excursion plus a 40 % margin, measured from t0.

head_x_displacement is the head x excursion relative to the vehicle (sled); its largest absolute value is used.

axis_weights

axis_weights(
    test: Mapping[str, ArrayLike],
) -> dict[str, float]

Axis weights from the physical test: w_i = max|c_i| / sum_j max|c_j|.

One axis gets weight 1; if every axis is zero, the weights are equal.

sensor_score

sensor_score(
    sensor: str,
    time: ArrayLike,
    test: Mapping[str, ArrayLike],
    simulation: Mapping[str, ArrayLike],
    simulation_time: ArrayLike | None = None,
    t_start: float | None = None,
    t_end: float | None = None,
) -> SensorScore

ISO/TS 18571 sensor score of a simulation against the sled test.

Parameters:

Name Type Description Default
sensor str

Sensor name, e.g. "head".

required
time ArrayLike

Test time, s.

required
test Mapping[str, ArrayLike]

Axis -> signal, e.g. {"x": ax, "y": ay, "z": az}; the same axes in both. Filter both the same way first (CP 005 channel classes); simulation output is submitted unfiltered.

required
simulation Mapping[str, ArrayLike]

Axis -> signal, e.g. {"x": ax, "y": ay, "z": az}; the same axes in both. Filter both the same way first (CP 005 channel classes); simulation output is submitted unfiltered.

required
simulation_time ArrayLike | None

Simulation time if it differs from the test time.

None
t_start float | None

Rating interval, s (T0 to Tend, see frontal_end_time).

None
t_end float | None

Rating interval, s (T0 to Tend, see frontal_end_time).

None

kpi_check

kpi_check(
    criterion: str,
    test: float,
    simulation: float,
    limit: float,
) -> KpiResult

rAC = AC / AC_limit for test and simulation, and dAC where rAC_test >= 50 %.

kpi_checks

kpi_checks(
    dummy: str,
    test: Mapping[str, float],
    simulation: Mapping[str, float],
    speed: int,
) -> list[KpiResult]

kpi_check for every criterion given for both test and simulation, with the dummy's lower performance limits at that speed (criteria not applicable to virtual tests are skipped).

validate_load_case

validate_load_case(
    label: str,
    sensors: Mapping[str, SensorScore],
    kpis: Sequence[KpiResult] = (),
    quality: CheckResult | None = None,
    required: Mapping[
        str, tuple[str, ...]
    ] = FRONTAL_SENSORS,
) -> CheckResult

Acceptance of one validated load case (Section 5.4).

Required sensors must score above 0.5 (missing ones are reported as not assessed), each assessed criterion must deviate by less than 30 %, and the model quality criteria must be met. Other sensors are listed in the notes as monitored. Axes scoring 0.5 or less are noted for a plausibility check (sign, units, channel mapping).

score_sled_virtual

score_sled_virtual(
    position: str,
    sled: Mapping[int, Occupant],
    virtual: Mapping[int, Occupant],
    validated: bool = True,
    hbm_provided: bool = True,
    tibia_lpl_exceeded: bool = False,
    band_fractions: Mapping[str, float] = BAND_FRACTIONS,
) -> SledVirtualScore

Score one front occupant in the sled and virtual load cases.

Parameters:

Name Type Description Default
position str

"driver" or "front_passenger".

required
sled Mapping[int, Occupant]

Load case number (1-5) -> physical sled test results, two load cases. Every body region is scored: 0.625 / 2 points per region and load case (2.5 points).

required
virtual Mapping[int, Occupant]

Load case number -> simulation results of the three other Hybrid III load cases: 0.625 / 3 points per region and load case (2.5 points). Knee displacement and tibia criteria are not applicable; the lower leg points are awarded by default.

required
validated bool

False if virtual data was not provided or did not meet the VTC validation criteria: only the sled load cases are scored.

True
hbm_provided bool

False if no human body model data was provided: the virtual score is halved.

True
tibia_lpl_exceeded bool

True if any dummy in any physical test (including full scale) exceeded the tibia index or tibia force LPL: no default virtual lower leg points.

False
band_fractions Mapping[str, float]

Share of the region points per colour band.

BAND_FRACTIONS